View Full Version : ALERT if not in frames...two options
07-07-2003, 05:06 AM
I need an ALERT to put on web pages within a framed web site. I do not want to break frames automatically -- I want to give the user the option. So, with the alert I need to give them a YES and a NO button. YES would open the web site in frames, and NO would allow them to remain on the exact non-framed page that they're already on.
07-08-2003, 12:53 AM
Let me be more specific. My web site is framed -- no options about it. Some of my sub-pages are coming up in search engines. When a user then follows said link, they're given my sub-page out of it's frame. I do not, however, want to force frames. I want to give them the option to go to the main framed site via a JS alert. Does that help?
hm... that sounds familiar... some time ago I've put a related question here... I wondered if there is any possibility to force parent frame if children frames are loaded when found alone by search engine.
Anyway, the general answer was that there is no client-side possibility to do that, so I don't think that your problem can be solved in this manner... but, yet, who knows...
07-08-2003, 03:09 PM
Actually it would only take a simple modification of the "force frames" script to do this.
if (top.location.href == location.href)
if (confirm("Show this page within it's proper frames?")) location.href = "place url for your frame here";
07-09-2003, 04:52 AM
Thanks (again) Roy. All it takes is a little JS coding knowledge. I'm glad you have it...since I don't. Your code works perfectly.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.