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
    May 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Remote JavaScript Causes iFrame Resize Failure



    Can anyone help me figure what kind of criteria I should use to search this forum for a clue as to my dilema?

    My page ( with inline JavaScript ) does what I want it to.

    Remotely hosting the Javascript causes the iFrame re-size action to fail.

    Thanks to all of the members in advance for their "two-cents" regarding this thread.


    ~~~


    > Inline JavaScript Example

    http://wxw.nfshost.com


    - HTML Code -

    Code:
    <html>
    <head>
    <title>Inline JavaScript Example</title>
    </head>
    <body>
    
    <script type="text/javascript">
    window.onload=function()
    {
    	var iframe=document.getElementById('iframe');
    	iframe.style.width='90%';
    	iframe.style.height='90%';
    }
    </script>
    
    <center>
    <iframe src="player.swf" id="iframe"></iframe>
    </center>
    
    </body>
    </html>

    ~~~


    > Remote JavaScript Example

    http://wyw.nfshost.com


    - HTML Code -

    Code:
    <html>
    <head>
    <title>Remote JavaScript Example</title>
    </head>
    <body>
    
    <script type="text/javascript" scr="http://wzw.nfshost.com/iframeresizer.js"></script>
    
    <center>
    <iframe src="player.swf" id="iframe"></iframe>
    </center>
    
    </body>
    </html>

    +++++++++++++


    > Remote JavaScript Example

    iframeresizer.js


    - JavaScript -

    Code:
    window.onload=function()
    {
    	var iframe=document.getElementById('iframe');
    	iframe.style.width='90%';
    	iframe.style.height='90%';
    }

    ~~~

    Last edited by Cognscenti; 05-31-2009 at 04:00 PM. Reason: Resolved

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,919
    Thanks
    79
    Thanked 4,423 Times in 4,388 Posts
    Ready to kick yourself??

    Code:
    <script type="text/javascript" scr="http://wzw.nfshost.com/iframeresizer.js"></script>
    Hmmm...maybe "scr" stands for "screwup"? (Sorry...cheap shot.)

  • Users who have thanked Old Pedant for this post:

    Cognscenti (05-31-2009)

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Indeed!

    Code:
    scr="http://www.maybe-code-with-my-eyes-open-from-now-on.ugh
    Thank you for your cheap shot! ;-D


  •  

    Posting Permissions

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