File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Reading content from iFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Reading content from iFrame" Watch "Reading content from iFrame" New topic

Reading content from iFrame

Sree Chinna
Ranch Hand

Joined: Jul 15, 2008
Posts: 42
I have a simple HTML page where I have an iFrame. I want to read the HTML from iFrame how do I do that ?
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can only read the content from the iframe if it is in your domain.

look into

var foo = document.getElementById("ifameId").getElementsByTagName("html")[0];

I agree. Here's the link:
subject: Reading content from iFrame
It's not a secret anymore!