Forum Moderators: open

Message Too Old, No Replies

Javascript won't display in an iframe

Ie6

         

SuzyUK

2:53 pm on Nov 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a javascript that displays some ads which it does so very nicely.. except then I put it in an iframe.. still works very nicely in NN7, Moz1.4 and Opera.

IE6 (haven't checked 5.5 and 5) won't display the script generated code, which is just tables AFAIK...

Any ideas?

Suzy

korkus2000

2:55 pm on Nov 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What happens in IE when it is not in an iframe? Also does the js code use DOM calls that may go beyond the bounds of frames. Like top.document.form1?

SuzyUK

3:08 pm on Nov 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Displays fine in IE when not in an iframe..

don't think it has any particular calls in it,

the javascript is a one line call to a php file full of "document.write" which generates the tables..

can you tell I don't know what I'm talking about ;)

This is the call to the script:

<script language="javascript" src="h**p://**.**.com/***.php?***=***&**=**"></script>

Suzy

<added>I have just taken the .php file code copy/pasted it into a .js file on my PC and it's working fine within the <iframe></added>

DrDoc

10:20 pm on Nov 4, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The reason it wouldn't work is probably MIME related. Did your PHP file print out a text/javascript header?
Otherwise it would render as text/html by default...