Forum Moderators: mack

Message Too Old, No Replies

possible to link to a specific page in site designed with frames?

         

morcar

8:12 am on Jul 7, 2005 (gmt 0)

10+ Year Member



Hi, this is a lame and stupid question. I should already know the answer, but I don't.

Is it possible to provide someone a text link to a specific page in a site that is designed with frames?

For example, take the site sevenboroughs.com, currently designed with frames.

If I write an email and want to provide someone a link that bypasses the main page and directs them straight to the page called "canis.shtml" - BUT STILL WITHIN THE FRAMESET...

...is this possible?

Dijkgraaf

1:07 am on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes it is possible, usually by having a URL like
framepage.php?page=canis.shtml
or
framepage.asp?page=canis.shtml
and the PHP or ASP page will then read the querystring and use that parameter to write that out as the source of the frame
<frame name="main" src="<%=page%>">

encyclo

1:12 am on Jul 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your question is neither lame nor stupid, morcar - it's a good one.

What you need to do is use Javascript to check whether the page is contained within its frame when loaded, and if not reload the same page inside the frameset. You might want to try tedster's "Force Many Pages Into Frames" script found in message #21 of this thread:

[webmasterworld.com...]

(that link should open at the right post).

The advantage with this method is that it will also work for visitors coming from search engines who would otherwise enter on an orphaned page outside its frameset.

<added>Dijkgraaf's suggestion is good too!</added>