Reading HTML in frame

C

Chip

Here's the problem: I need to look up records from Library of Congress and
associate the data to a book in my database.

Here's how I think it should work. Open the Library of Congress search page
in a frame within my app. Do your searching and select a record. Now click a
button on the "my app" frame to import that record.

I should be able to read the HTML in one of two ways:
Access the buffer in the other frame
Get the URL from the other frame and access the page through more
conventional means

I would prefer to just read a buffer since I've already accessed the page.
Can somebody help with some pointers to how I can read the HTML in a frame?

Thanks,
Chip
 
C

Chad Z. Hower aka Kudzu

Chip said:
Here's how I think it should work. Open the Library of Congress search
page in a frame within my app. Do your searching and select a record.
Now click a button on the "my app" frame to import that record.

How will you import it? If its in a frame, it will be in the users browser.
JS might get it - but often different windows and frames that are from
different domains are security blocked.
I should be able to read the HTML in one of two ways:
Access the buffer in the other frame

Maybe? Might be security restrictions.
Get the URL from the other frame and access the page through more
conventional means

By refetching on to the server?
I would prefer to just read a buffer since I've already accessed the
page. Can somebody help with some pointers to how I can read the HTML in
a frame?

You will have to use Javascript - if the security model will let you because
its a different domain.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
C

Chip

Chad Z. Hower aka Kudzu said:
How will you import it? If its in a frame, it will be in the users browser.
JS might get it - but often different windows and frames that are from
different domains are security blocked.
Thanks for the reality check -- of course the buffer is in the browser and
not the server.
Is there any way to capture the URL of the page the user has open in this
frame?

Chip
 
C

Chad Z. Hower aka Kudzu

Chip said:
Thanks for the reality check -- of course the buffer is in the browser and
not the server.
Is there any way to capture the URL of the page the user has open in this
frame?

I *think* you might be able to read the URL. But then again, maybe not
because URLs often contain sensitive info that could be used by a hacker.
You'll need to look at the JS security model as well as try it out.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top