Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Script across frames in Mozilla/Netscape FRUSTRATION!

    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!

  • #2
    New to the CF scene
    Join Date
    Sep 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OOPS!!! URL correction!

    Sorry, I feel stupid... we have many URLS. some are hyphenated,a dn this is one of them!!

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


  • #3
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    iframe_parent.html
    Code:
    <!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
    Code:
    <!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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •