Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inner.html - possibly!! 3

Status
Not open for further replies.

nickdel

Programmer
May 11, 2006
367
GB
Guys, looking for more of a solution here. What I have is this:


This as you will see is split into 2 frames. the top being a local header menu and the other points to this site:


is there anyway javascript method that would allow me to show this in a div on just one page and eliminate the need for frames as it looks a bit naff!

Thank

Nick
 
You could load the other page in an iframe 1 x 1 pixel in size, then read the iframe with Javascript and parse the HTML into what you want and stick that in a div on the page.

Lee
 
Nick,

I would say no. But I'm not entirely sure though. Considered an iframe? Still frames, but maybe a better way still...

A server side script would help you if you've got that option.
 
The iframe would be small enough that it wouldn't display (not sure if you can make it 0 x 0 pixels), just something to stick the other page's HTML in.

I agree that server-side scripting is the best way, and those who have browser scripting disabled wouldn't be able to see the things written to the page with Javascript.

Lee
 
What a great and creative idea, Lee! That's gone right into my cook-book-o-tricks now ;-)

Have a star!

How about styling the iframe with display:none; then it's "gone" from the viewport, but still accible for leaching the html.
 
I don't think you can read the hidden frame source with Javascript, so it would best be done with server-side scripting.

Lee
 
Meant to elaborate on that. Since the src of the frame is from another domain, the parent page being able to read that would create security issues.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top