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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading orphaned pages into frameset from old links

Status
Not open for further replies.

hwylio

Programmer
Jan 20, 2007
2
GB
Hi

I use this script to force pages into a frameset, however, many of the pages are indexed by most search engine. Is it possible that when someone accesses contact.html, for example, from a search engine, that the frameset is forced, and the contact.html page loads into the bottom frame, rather than redirecting, as below?


<script language="javascript" type="text/javascript">
<!--
if (top.location == self.location) { //if page is not in its frameset
top.location.href = " }
//-->
</script>
 
I hope I get your gist, excuse my stumbling if I do not.

I had a lot of trouble with "rather than redirecting". It seems to me that this rules out the most direct solution.

maybe I do not understand you goal.

If a framed webpage is placed in the main window location URL - it will load as an independent page.

You can write a script to detect this unframed window, and immediately redirect the window location to the main framed page (with full frameset).

Please tell me what more you want to achieve.

For example ... Does you main frameset normally populate the splash page with a different frame content than the desired one from the search? Then you might want to consider writing an alternate frameset defining the initial page you want .. and re-direct to that one.


 
Hi

Thanks

Yeh, sorry. What I mean is, if contact.html has been indexed by search engine,s and when someone accesses that page directly - then is it possible to redirect the user to the all new frameset I have just added to the site, but loads the contact.html into the bottom frame, rather just redirecting to the homepage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top