Is it possible to change the source of an IFrame using Javascript. I want to be able to click a link on the main page and then load the correct screen into the iframe.
Printable View
Is it possible to change the source of an IFrame using Javascript. I want to be able to click a link on the main page and then load the correct screen into the iframe.
Sorted it.
Ok, i know you got it, but i am just wondering, why would you have to change the source to do that??
Not sure what you mean there. I have one page with a menu down the side and an IFrame that I load other pages into. I didn't want to use Frames so this was the only other method I could think of.
you can use this code
document.frames("iframe1").href = "a.htm"
or
document.frames("iframe1").location = "a.htm"
bye & take care
FYI
iframes don't work in NS, and that means all of them, NS uses layers instead. just thought you ought to know :)
they don't work in ns6 do they?
Actually NN6 does support the IFRAME element:
http://developer.netscape.com/evange.../html-element/
cool. man, i am starting to like NS6 more and more!
Eventually they will get to the level that IE is at now but by then IE will be far beyond them.
i guess. they are pretty close now.
I read the new "JavaScript Bible" book a little while ago and the funny thing is that alot of what Netscape is putting into NN6 has been around in IE since version 4!
I don't recommend this book by the way...all of the good chapters are on CD!