473,327 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

accessing content of an <IFRAME>

I have a situation where I'd like to read/parse the content
of a file I've read into an <IFRAME>. I've looked through
various FAQs and searched forums, and the closest I get to
accessing the file content is

myIframe.contentWindow.document.body.innerHTML

where myIframe is the node from getElementById(). But while
I can see the content of the file on my web page, I get an
empty string from the above reference. How do I get to the
file?

Thanks for any help.
Jul 23 '05 #1
2 3909
Richie wrote:
I have a situation where I'd like to read/parse the content
of a file I've read into an <IFRAME>. I've looked through
various FAQs and searched forums, and the closest I get to
accessing the file content is

myIframe.contentWindow.document.body.innerHTML

where myIframe is the node from getElementById(). But while
I can see the content of the file on my web page, I get an
empty string from the above reference. How do I get to the
file?

Thanks for any help.


if myIframe is the IFrame itself, you only need
myIframe.document.body.innerHTML.

But that won't give you the *entire* document, and it also "normalizes" it.

If the document is in the same domain, you can even look into the
HTTPRequestObject <URL: http://jibbering.com/faq/#FAQ4_38>

Good luck with it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
In article <IewZc.101180$Fg5.53725@attbi_s53>,
Richie <sp*********@comcast.net> wrote:
I have a situation where I'd like to read/parse the content
of a file I've read into an <IFRAME>.


This post I did earlier might help.

See:
reading items in a host directory

http://groups.google.com/groups?hl=e...a3fdaa1f2e8&rn
um=1

Robert
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: O.J. Tibi | last post by:
hi guys, i was wondering if you could help me with a small problem. i need to have an <iframe> to behave like a <div>, in such a manner that: 1) the <iframe> should have its own display space,...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
2
by: chaitatp | last post by:
Hi guys, I have posted a similar question before but this post has some different. The similar link is: ...
5
by: Grzesiek | last post by:
Hi! I have created page which contains some menu buttons and <iframe> with sub-page. Each menu action on the master web site should change content of iframe (by changing src attribute). But how to...
1
by: tilt | last post by:
Hello, I use an object element to replace the iframe element in ie, like this: <object id="x_obj" data="http://.../" type="text/html"> <iframe name="x_if" id="x_if"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.