Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-31-2009, 04:10 AM   PM User | #1
Cognscenti
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Cognscenti is an unknown quantity at this point
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
Cognscenti is offline   Reply With Quote
Old 05-31-2009, 07:33 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,244
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.)
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
Cognscenti (05-31-2009)
Old 05-31-2009, 03:47 PM   PM User | #3
Cognscenti
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Cognscenti is an unknown quantity at this point
Indeed!

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

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:41 PM.


Advertisement
Log in to turn off these ads.