Forum Moderators: open

Message Too Old, No Replies

Help! Document.Write and multiple Iframes not working?!

         

Medianeer

7:01 pm on Feb 27, 2006 (gmt 0)

10+ Year Member


I'm trying to use javascript to write multiple iframes, but after the 1st iframe is written, nothing else is displayed, including the rest of the html of the page... Here's what I'm using:

<SCRIPT>
<!--
document.write('<IFRAME SRC="http://www.google.com/" WIDTH="100" HEIGHT="100"></FRAME>');
// -->
</SCRIPT>

<HR>

<SCRIPT>
<!--
document.write('<IFRAME SRC="http://www.google.com/" WIDTH="100" HEIGHT="100"></FRAME>');
// -->
</SCRIPT>

Any ideas? Can anybody make this work?

Thanks!

DrDoc

7:12 pm on Feb 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is this triggered after the page has loaded, or is it being output as the page is in the process of loading?

DrDoc

7:13 pm on Feb 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, slightly off topic ...

You should, first of all, lowercase your tags. You should also define the

type
attribute for your script tags.

Medianeer

7:17 pm on Feb 27, 2006 (gmt 0)

10+ Year Member


Ha ha ha!
I found my problem... I was closing the iframe with </FRAME>, instead of </IFRAME>

Thanks a bunch for your quick reply, anyway!

DrDoc

9:52 pm on Feb 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Aha! Well spotted :)