joecool2005
01-16-2008, 01:24 PM
Hi,
I have a frame that works on IE 7 but does not work on safari 3.
It shows the message like this:
TypeError: Value undefined (result of expression top.frames["toolbar"].doSomething2) is not object.
Here is the code
default.htm
<HTML>
<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>
</HTML>
button.htm
<html>
<head>
<script>
function doSomething2(){
document.write("this is my document");
}
</script>
</head>
<body>
my page
</body>
</html>
button2.htm
<HTML>
<script>
try{
top.frames["toolbar"].doSomething2()
}
catch(e){alert(e);}
</script>
<body>
button2<br />
</body>
</HTML>
I have a frame that works on IE 7 but does not work on safari 3.
It shows the message like this:
TypeError: Value undefined (result of expression top.frames["toolbar"].doSomething2) is not object.
Here is the code
default.htm
<HTML>
<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>
</HTML>
button.htm
<html>
<head>
<script>
function doSomething2(){
document.write("this is my document");
}
</script>
</head>
<body>
my page
</body>
</html>
button2.htm
<HTML>
<script>
try{
top.frames["toolbar"].doSomething2()
}
catch(e){alert(e);}
</script>
<body>
button2<br />
</body>
</HTML>