Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar i,c,obj=parent.frames['Zone3']; // Voir la nature de l'objet alert(typeof(obj)); // Si c'est effectivement in objet c=''; for (i in obj) c+=' '+i+'=>'+obj[i]; alert(c);
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML lang="fr"> <HEAD> <META http-equiv="content-type" content="text/html; charset=utf-8"> <META name="generator" content="PSPad editor, www.pspad.com"> <TITLE>Frames</TITLE> <style type="text/css"> </style> <script type="text/javascript"> </script> </HEAD> <FRAMESET COLS="20%,30%,50%"> <FRAME SRC="frame1.html" NAME="gauche"> <FRAME SRC="frame2.html" NAME="centre"> <FRAMESET ROWS="20%, 30%, 50%"> <FRAME SRC="frame3.html" NAME="droit_haut"> <FRAME SRC="frame4.html" NAME="droit_milieu"> <FRAME SRC="frame5.html" NAME="droit_bas"> </FRAMESET> </FRAMESET> </HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <HTML lang="fr"> <HEAD> <META http-equiv="content-type" content="text/html; charset=utf-8"> <META name="generator" content="PSPad editor, www.pspad.com"> <TITLE>frame 1</TITLE> <style type="text/css"> </style> </HEAD> Frame1 nom gauche <script type="text/javascript"> var obj=parent.frames; c=''; for (i=0;i<obj.length;i++) c+='\n '+i+'=>'+obj[i].document.location; alert(c); parent.frames[4].document.location='frame5bis.html' </script> </HTML>
<html> <head> <title>Audio Collection</title> </head> <frameset rows="5%,19%,67%,8%" frameborder=no> <frame src="Utils\Zone1.html" name="zone1"> <!-- 1° ligne --> <frame src="Utils\Zone2.html" name="zone2"> <!-- 2° ligne --> <frameset cols="20%,20%,20%,40%" frameborder=no name="zone3" > <!-- 3° ligne --> <frame src="Utils\Zone4.html" name="zone4"> <!-- 1° colonne --> <frame src="Utils\Zone5.html" name="zone5"> <!-- 2° colonne --> <frame src="Utils\Zone6.html" name="zone6"> <!-- 3° colonne --> <frame src="Utils\zone7.html" name="zone7"><!-- 4° colonne --> </frameset> <frame src="Utils\Zone8.html" name="zone8"> <!-- 4° ligne --> </frameset> </html>
<html> <head> <script language="Javscript" type="text/Javascript"> function ouvrePageD() { document.getElementById('Zone4').src = "D.html"; document.getElementById('Zone5').src = "../../Utils/Blank.html"; document.getElementById('Zone6').src = "../../Utils/Blank.html"; document.getElementById('Zone7').src = "../../Utils/Blank.html"; } </script> </head> </html>
<html> <head> <script language="Javscript" type="text/Javascript"> function test1() { parent.frames['zone5'].location.href = 'Zone5.html';//marche pas parent.frames['zone6'].location.replace( 'Zone6.html');//marche pas parent.document.getElementById('Zone7').src='Zone7.html';//marche pas } </script> </head> </html>
<html> <head> </head> <frameset rows="5%,15%,71%,8%" frameborder=no> <frame src="Utils\Zone1.html" name="zone1" frameborder=no> <!-- 1° ligne --> <frame src="Utils\Zone2.html" name="zone2" frameborder=no> <!-- 2° ligne --> <frame src="Utils\Zone3.html" name="zone3" frameborder=no> <!-- 3° ligne --> <frame src="Utils\Zone8.html" name="zone8" frameborder=no> <!-- 4° ligne --> </frameset> </html>
parent.frames['zoneN'].document.location ou parent.frames[N-1].document.location='monFichier.html' ?