Forum Moderators: open

Message Too Old, No Replies

My index.htm page has an iFrame named "main"...

working with iFrames

         

ChadRoe

4:11 am on Jun 17, 2005 (gmt 0)

10+ Year Member



Ok, My main page is (index.htm) and has all my graphics (layout) on it. Right in the middle of it I have an iFrame named (main) where all my content pages load. I have it set to open with (home.shtml) when you go to my index.htm URL. When I click on all my buttons, the button page loads in the iFrame like it is supposed to.

Now, we all know that if I were to navigate to (http://example.com/about.htm) that the browser would open that page only, without the index page around it.

What I want to know is, how can I go to my index.htm page and choose what page to load in the iFrame? I want it to always open (home.htm) in the iFrame by default, but if I wanted to send a user to a specific page via a URL, how would I go about doing that?

[edited by: tedster at 4:55 am (utc) on June 17, 2005]
[edit reason] use example.com for domain name [/edit]

tedster

5:02 am on Jun 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Weclome to to forums, ChadRoe.

Any html document that is displayed within a frame or an iframe can (and should, IMO) also contain script that inserts it into its parent page in the event that someone comes there directly -- an "orphan"display of a page that is intended to have a "parent" . For example, search engines index the framed documents and then send people directly to the orphan page all the time.

This can be done with javascript. We have an example of how to do this with a regular frame page - but you can adapt the idea for an iframe page with just a few changes:

See Message #21 on:
[webmasterworld.com...]

ChadRoe

5:07 am on Jun 17, 2005 (gmt 0)

10+ Year Member



I actually figured it out right before you replied! Thanks for the reply though. This board is very helpfull!

- Chad
<SNIP>

[edited by: BlobFisk at 8:41 am (utc) on June 17, 2005]
[edit reason] No URLs please! See TOS [webmasterworld.com] [/edit]