Bonjour,
J'ai créé des frames le plus simple possible.
Ce code suivant fonctionne sur IE6 et IE7 mais ne fonctionne pas sur Safari 3.0.4.
Je reçois cette erreur
Pouquoi?"TypeError: Value undefined (result of expression top.frames["toolbar"].doSomething2) is not object."
Pouvez-vous m'aider?
Merci
Joe
default.htm
button.htm
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 <frameset id="frameset1" rows="119,*" name="frameset1" border="0" frameSpacing="0" frameBorder="no"> <frame name="toolbar" id="toolbar" src="button.htm" marginheight="0" marginwidth="0" scrolling="no" NORESIZE> <frame name="top_main" id="top_main" src="button2.htm" marginheight="0" marginwidth="0" NORESIZE> </frameset>
button2.htm
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <html> <head> <script language="JavaScript"> function doSomething2(){ alert("this is my document"); } </script> </head> <body> my page </body> </html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <HTML> <script language="JavaScript"> try{ top.frames["toolbar"].doSomething2() } catch(e){alert(e);} </script> <body> button2<br /> </body> </HTML>
Partager