Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member Tomaszewski's Avatar
    Join Date
    Oct 2006
    Location
    Exton, PA
    Posts
    194
    Member #
    14132
    hey guys, i'm having some issues here... i'm trying to add an iFrame to this page but am just NOT having any luck with it. My code is here: http://friendpaste.com/2ZubghLFSigbOpepcnvWxm.

    What I'm trying to do is access the iFrame via JavaScript and change its content based on a menu click. Now I got this to work:


    My Example:
    HTML Code:
    <html>
    <head>
    	<script type="text/javascript">
    		//<![CDATA[
    			function frameHandle()
    			{
    				myFrame.src="http://www.yahoo.com";
    			}
    		//]]>
    	</script>
    </head>
    <body>
    <div> sfdsdlfdhslfj </div>
    <span> hisdhfsfd,</span>
    <p><div>
    	<div><div><iframe id="myFrame"></iframe></div></div>
    
    	<p><a href="#" onclick="frameHandle()">GO</a></p>
    	</div>
    	</p>
    	
    </body>
    </html>
    but I can't get the same thing running on the former page.

  2.  

  3. #2
    Senior Member Tomaszewski's Avatar
    Join Date
    Oct 2006
    Location
    Exton, PA
    Posts
    194
    Member #
    14132
    ... i forgot to add that i get this error:

    Code:
    abcis undefined
    tryMe()test.html# (line 13)
    onclick(click clientX=946, clientY=128)y9Z11Eqe...uDQ%3D%3D (line 2)
    [Break on this error] alert(abc.height);

  4. #3
    Senior Member Tomaszewski's Avatar
    Join Date
    Oct 2006
    Location
    Exton, PA
    Posts
    194
    Member #
    14132
    ahh nevermind, i figerd' it out!

    if anyone is interested, here was the trick!

    HTML Code:
    				function tryMe()
    				{
    					var tomek = document.getElementById("myFrame");
    					tomek.src="http://www.yahoo.com";
    				}


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:07 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com