all groups > dotnet jscript > january 2007 >
You're in the

dotnet jscript

group:

Reading content of an IFRAME ?



Reading content of an IFRAME ? Sody
1/10/2007 2:51:07 PM
dotnet jscript: Hi, is there some posibility how to read inner text from IFRAME on
server-side ?
I've tested it with innerText and InnerHtml but it doesnt work

I also tested it on client-side with JavaScript but I'm still not able
to read innerText or innerHTML of that frame.

The problem is, I need to read content of that IFRAME. In that content
is EXPORT text I need to read in my application.

Here is example of that export:
START
YourID: 123
Data1: 12346
Data2: 977
END

How to read it from IFRAME and how to make it "visible" for code-behind
code ?

Re: Reading content of an IFRAME ? Ayush
1/10/2007 3:13:13 PM
Replied to [Sody]s message :
[quoted text, click to view]

You can use :
document.frames[0].document.body.innerText
to read the text of body.. but this will work only if they are on same domain. If you
want to read the contents of another domain then read this :
http://virtuelvis.com/archives/2005/12/cross-document-messaging
This is for Opera and works like a charm ... i dont know if this works in IE or not..

--
→ Ayush
-------------
Search - www.Google.com | Wikipedia - http://en.wikipedia.org
Snip your long urls - http://snipurl.com/
AddThis Social Bookmark Button