473,545 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.conten tWindow.documen t.body.innerHTM L

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 3921
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.conten tWindow.documen t.body.innerHTM L

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.docume nt.body.innerHT ML.

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
HTTPRequestObje ct <URL: http://jibbering.com/faq/#FAQ4_38>

Good luck with it.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
In article <IewZc.101180$F g5.53725@attbi_ s53>,
Richie <sp*********@co mcast.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
3749
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, indicated by the "display: block;" style. 2) the <iframe> should resize automatically to display its contents. 3) the <iframe> should not have any...
44
919
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 put either tag inside an HTML <TD> and have the same kind of scrolling effect. This would allow me to fill the screen and have the size of the...
2
2034
by: chaitatp | last post by:
Hi guys, I have posted a similar question before but this post has some different. The similar link is: http://groups-beta.google.com/group/comp.lang.javascript/browse_thread/thread/a4e7317eee02579f/13714e97d19ff2a7#13714e97d19ff2a7 When I put <embed> in an <iframe> using javascript, I can't see the embedded object in Firefox. But if...
5
2250
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 detect when user has opened subpage not in master's <iframe> ? Is it possible to obtain reference to master's page from sub-page ? When I'm trying...
1
6163
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" src="http://.../">
0
7478
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4960
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.