View Full Version : Scripts and website entrance
Borchik
03-22-2001, 10:24 PM
Does anyone know of a script that make it so visitors can only enter a website with frames by starting at the main page, in other words they can't enter a certain page off of a search engine unless it is the index page OR they automatically get redirected to the main page if they come off a search engine. Im sure i have seen this out there somewhere but i cant remember where.
Thanks
jonirvine
03-25-2001, 04:01 AM
Hi Borchik,
Here's the code you need:
<SCRIPT LANGUAGE="JavaScript">
<!--
if (top == self) self.location.href = "index.html";
// -->
</SCRIPT>
Replace index.html with the main frameset page.
Jon
jonirvine
03-25-2001, 04:02 AM
Oops,
You need to put this code on every page.
Jon
Borchik
03-25-2001, 12:02 PM
thanks, does this one work in all browsers?
jonirvine
03-25-2001, 01:01 PM
I know it works in Netscape 4.6, 4.7 and IE 5+, not sure about the rest but should do... it's pretty basic.
Jon
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.