Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internal Frame - Not Using Predefined Page 1

Status
Not open for further replies.

Graeme06

Technical User
Jun 6, 2006
60
Hi, another question:
I have the following code:
var url = " document.getElementById("external").src=url;

"external" is just an iframe. So all this does is load google in an internal frame.

Now the thing is what I want to load inside this frame isn't an actual pre designed website (I just put google in there as an example). It's going to be different depending on the situation. Basically, is there a way instead of saying url = to have something like url=
"<html><head><title>hello</title><body>thisisapage</body> "

It will be a very small page (just a two row table), but I'm not sure if that makes any difference

Thanks,
Graeme
 
I think you have a good idea, but how would I write to the internal frame because document.write() just writes to the main page and not the inner frame. I also tried document.getElementById("external").write("heyyyy");
but that doesn't seem to do anything (write may not even be a method of getElementByID)
 
Okay well I found some IE only code that does what I need

document.frames[0].document.open();
document.frames[0].document.write('Hello world');
document.frames[0].document.close();

Anyone have any idea how to rewrite this for any browser?
 
ah nevermind, got it, Thanks for the idea though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top