473,666 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

breaking out of frameset problem

Hi,

I use the following code to force the page to load into the intended
frameset (navigation purposes) if visitors come to pages in a certain
section of the site from search engines/external links.

<script language="JavaS cript"><!--
if (parent.locatio n.href == self.location.h ref)
window.location .href = 'index.htm?page one';
//--></script>

This works very well BUT.... if the visitor hits the browser back button all
it does is reload the page and frameset unless you either use the onsite
navigation or call up the previous pages with the carat by the back button.

Is there any way of making sure that if the visitor simply hits the back
button they break out of the frameset and return to wherever they cam from?

Thanks
Jul 20 '05 #1
1 3785
"David" <da************ *@ntlworld.com> writes:
Hi,

I use the following code to force the page to load into the intended
frameset (navigation purposes) if visitors come to pages in a certain
section of the site from search engines/external links.

<script language="JavaS cript"><!--
if (parent.locatio n.href == self.location.h ref)
window.location .href = 'index.htm?page one';
//--></script>

This works very well BUT.... if the visitor hits the browser back button all
it does is reload the page and frameset unless you either use the onsite
navigation or call up the previous pages with the carat by the back button.

Is there any way of making sure that if the visitor simply hits the back
button they break out of the frameset and return to wherever they cam from?

Try
if (top == self) {
location.replac e('index.htm?pa geone');
}

Using location.replac e means that the current page is replaced, even
in the history, with the new one.

Consider whether it is a good idea to force how people see your page,
and that your frameset depends on javascript. Perhaps you should have
a different frameset for this that depends on javascript, and a
non-javascript one for people who enter at the front page.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3532
by: Hans | last post by:
Hi There, I have a page that has links with some variables and I need to open the results set in a frameset. I have tried doing this in various different ways, but still cannot get the variable passed to the relevant frames within the frameset. What is the best way of getting this done. Thanks Hans
5
2306
by: dan (dj74) | last post by:
Hi All, my application looks like this: (file index.php) application = new MyApplication(); application->run(); //all code of the application is in MyApplication class and other
6
4014
by: Wladimir Borsov | last post by:
I would like to load multiple web pages from Internet into ONE single browser window - one below the other. How do I do that most easily ? One idea is to built a frameset (for e.g 6 web pages) like: <FRAMESET ROWS="*,*,*,*,*,100%" BORDER=0 FRAMEBORDER=0> <FRAME SRC="http://www.firstdomain.com/index.html" NAME="first" MARGINWIDTH=1 SCROLLING=NO TITLE=1> <FRAME SRC="http://www.secdomain.com/welcome.html" NAME="second" MARGINWIDTH=1...
6
6663
by: Stefan Mueller | last post by:
After my web page has been loaded I'm doing some tests with a JavaScript. If I figure out that something is wrong I'd like to reload the whole frameset. With Internet Explorer and Mozilla Firefox I can reload the whole frameset with parent.location.href = "index.html"; However, this doesn't work with Opera. Does someone know how to do that with Opera?
2
1703
by: Mark | last post by:
Hello. I am working on a common problem. . .restoring frameset context when a user links directly to a page. Loading the frameset isn't a problem. . .there are numerous examples of simple Javascript procedures that will do it, like this: if (top.location.href.indexOf("../index.html") == -1) top.location.href = "../index.html";
3
3463
by: mark4asp | last post by:
According to this <http://css-discuss.incutio.com/?page=BoxModelHack> IE6 will display differently to the W3C standard. Only IE6/strict and I suppose IE 7 display correctly. IE 6 transitional and frameset are wrong. My users are still using IE 6 and I have a frameset in most of my pages - this is just a one line tickertape thing but it has to stay there. The guy who wrote the site made some errors here (specifying xml strict but...
12
5610
by: Geoff Cox | last post by:
Hello I'm having a problem loading a frameset file using an include in a php file. Nothing is displayed and when I look at the source code I see that <html> <head> <title></title>
4
3734
by: maminx | last post by:
Hello..i have problem, hope someone can help me..i have this frameset below : <FRAMESET ROWS="55%" COLS="37%,63%"> <FRAME NAME="runningTrade" SRC="http://runningtrade.com" scrolling="no"> <FRAMESET ROWS="33%" COLS="51%,49%"> <FRAMESET ROWS="34%,34%,35%" cols="*"> <FRAME NAME="orderBook" SRC="http://od.com" scrolling="no"> <FRAME NAME="orderBook2" SRC="http://od2.com" scrolling="no"> <FRAME NAME="OrderBook3" SRC=""...
0
8362
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8878
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8785
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8644
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6200
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5671
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.