|
|
|
|
Bonjour,
J'ai un petit soucis pour un site que je construit, c'est sûrement une bricole, mais j'arrive vraiment pas à comprendre pourquoi mon code ne fonctionne pas (ni sous Firefox, ni sous IE):
Au chargement de la page, j'ouvre un popup (ça ça marche, encore heureux), et je veux fermer le popup en cliquant sur lien de la page de départ. C'est facile pourtant, non ?
Voici mon code :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <script language="javascript"> var Sys; // Lancement de la Démo function startDemo(){ Sys = window.open('AdresssePopup','Nom','Paramètres'); } // Fermeture des fenêtres de démo function stopDemo(){ Sys.close(); } </script>
Configuration: Windows Vista Firefox 3.0.3
Etrange car chez moi tout marche niquel.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <script language="javascript"> var Sys; // Lancement de la Démo function startDemo(){ Sys = window.open('AdresssePopup','Nom','Paramètres'); } // Fermeture des fenêtres de démo function stopDemo(){ Sys.close(); } startDemo(); </script> <table> <tr><td onclick='stopDemo()'> sgdfgfdg </td></tr> </table> </body> </html> ... Montre moi le reste de ton code. Le "lol" est aux boulets ce que le ";" est aux programmeurs b2eda605511811988d04704ed7e809a4 |
Merci de répondre aussi vite !
<body style="background-color: rgb(60, 62, 121);"
alink="#ee0000" link="#0000ee" vlink="#551a8b">
<br>
<table style="width: 601px; height: 373px; background-color: white;">
<tbody>
<tr>
<td style="text-align: center; vertical-align: middle;">
<h2 style="color: rgb(0, 138, 74);">Démonstration</h2>
</td>
</tr>
<tr>
<td
style="background-color: white; text-align: center; vertical-align: middle;"
onclick="startDemo();"><img
style="width: 128px; height: 128px;" alt="Lancer la démo"
src="Abstract2b.jpg"> </td>
</tr>
<tr>
<td align="center">
<a onclick="Sys.close();" href="">Fermer les
fenêtres</a>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
Et il n'y a pas à dire, je comprends toujours pas pourquoi ça marche pas... Ha et sous IE l'erreur est : Ha ben ça alors, maintenant ça marche sous IE !! |