|  | 
 | 
|  | ||
| 
 | 
| Subject:
Force redirect to frameset Category: Computers > Programming Asked by: jhabley-ga List Price: $10.00 | Posted:
01 Jul 2003 18:58 PDT Expires: 31 Jul 2003 18:58 PDT Question ID: 224095 | 
| I have two web sites. 1. A regular multi-page site at http://www.abc.com/forums/ (sample URL only) 2. A frameset at http://www.abc.com/mainmenu/ (sample URL only) which has two frames: 'left' and 'right'. In 'left' are three links -- one goes to the /forums/ site. Many people have bookmarked the /forums/ URL, but I'd prefer that they start at the /mainmenu/ site so they can see the other two link options in the mainmenu's left frame. Here's my question: How do I make it so that anytime someone visits a page at /forums/, they get redirected to that page, but inside the /mainmenu/ frameset? | 
|  | ||
| 
 | 
| Subject:
Re: Force redirect to frameset Answered By: dewolfe001-ga on 01 Jul 2003 19:16 PDT | 
| What you can do is use Javascript to see if you have a Frames environment. If you are not in a frames environment (hence the !top.frames[1] line-- (! means not or untrue)), it will relocate the user to a frameset page that builds the frames. Replace "frame_framed.html" with the frameset page for your site-- or use a full web address (e.g. http://www.dewolfe.bc.ca/web/javascript/frame_framed.html). If you put the following HTML near the top of your forum page, it will force users into a frames environment should they try to open the forum in a window of its own: <HTML> <HEAD> <SCRIPT language="JavaScript"> <!-- function Framed() { if (!top.frames[1]) { location.href = "frame_framed.html" } } // --> </SCRIPT> </HEAD> <body onLoad="Framed()";> <font face="arial"> </body> </html> An example of this use can be found at: http://www.dewolfe.bc.ca/web/javascript/frame_framed.html | 
|  | ||
| 
 | 
| There are no comments at this time. | 
| If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. | 
| Search Google Answers for | 
| Google Home - Answers FAQ - Terms of Service - Privacy Policy |