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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get Iframe's HTML?!

Status
Not open for further replies.

FOR111

Programmer
Sep 29, 2005
103
MT
Hi all,

I need some help if you don;t mind..i'm trying to retrieve the Iframe's HTML? how can i do that?

I started off using the following but got blocked thereafter:

Code:
var myHTML = document.getElementById('myIframe').document;


thanks
Nick
 
[tt]document.getElementById('myIframe').src[/tt]
 
hi tsuji...

.src will give me only the url link...i need the actual html code!?

Thanks for your reply
Nick
 
Suppose the iframe name and id are both "myIframe" ---otherwise, set a name to it and use it---, then this is a partial solution.
[tt] document.frames["myIframe"].document.body.innerHTML[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top