Forum de discussion
Forum « Programmation Javascript » (archives)
Re: fermeture d'un jeu de frame
Envoyé: 4 août 2004, 4h36 par Hack_Track
Fichier 'popupManager.html':
----------------------------
<html>
<!--
Author: Philippe Fery
Creation: Augustus 4, 2004
philippefery@hotmail.com
-->
<head>
<title>Untitled</title>
<script>
w = window.open('framedPage.html','','');
w.resizeTo(640,480);
w.moveTo(200,100);
function closePopup(){
w.close();
}
</script>
</head>
<body>
<button onclick="closePopup();">Fermer la popup</button>
</body>
</html>
Fichier 'framedPage':
----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!--
Author: Philippe Fery
Creation: Augustus 4, 2004
philippefery@hotmail.com
-->
<head>
<title>Untitled</title>
</head>
<frameset rows="20%,*">
<frame src = "test1.html" >
<frame src = "test2.html" >
</frameset>
</html>
Fichier 'test1.html':
----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
Test 1
</body>
</html>
Fichier 'test2.html':
----------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<!--
Author: Philippe Fery
Creation: Augustus 4, 2004
philippefery@hotmail.com
-->
<body>
Test 2
<p>
<button onclick="top.opener.closePopup();">Fermer cette fenêtre</button>
</body>
</html>
;-)
HackTrack
Réponses
|