...

View Full Version : Script across frames in Mozilla/Netscape FRUSTRATION!



bodiddley
09-22-2004, 08:33 PM
I have a simple question (I think!!)

Site with multiple frames (http://www.thenbagroup.com ) and a Flash piece in "frame 1"

When I load "frame 3," it calls the javascript function which is resident in "frame 1" to make the flash behave a certain way.

It's that simple... I.E. loves it, but Netscape/Mozilla don't like the javascript being called from ANOTHER frame. Any ideas/hints/seen it before? I'm wondering if there is any workaround, but afraid there may not be!

thanks, in advance, for ANY insight you can offer!

bodiddley
09-22-2004, 08:50 PM
Sorry, I feel stupid... we have many URLS. some are hyphenated,a dn this is one of them!!

http://www.the-nba-group.com

:eek:

hemebond
09-22-2004, 10:20 PM
iframe_parent.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Iframe test</title>
</head>
<body>
<iframe id="iframe" src="iframe_child.html"></iframe>
<input type="button" value="Go" onclick="document.getElementById('iframe').contentDocument.defaultView.update();">
</body>
</html>iframe_child.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Iframe test</title>
<script type="text/javascript">
function update()
{
document.getElementById("txt").value = "Function update called";
}
</script>
</head>
<body>
<input id="txt" type="text">
</body>
</html>This works in Gecko browsers and Opera. I suggest you start Mozilla Firefox or Mozilla Seamonkey (the suite) for testing and debugging. I created these pages by using the DOM Inspector.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum