faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 28 people (64%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How can I acces the ENTIRE contents of an iframe?

Jun 29th, 2001 05:31
Mike Jones, Marcus de Leon,


the following will assign the entire IFRAME document (ie including 
HTML) to a variable:

var content = IFrame_Name.document.body.createTextRange().htmlText

the following will only assign the IFRAME's text:

var content = IFrame_Name.document.body.createTextRange().innerText