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

Oopen password protected page

Status
Not open for further replies.

jockm

Technical User
Aug 13, 2002
41
GB
Over in my website ( I have a page that will only open with the correct password. (In this case the password is "leaders" (without the quotes). The page is simply called: leaders.html.

It opens fine with the password, but it opens in a new window. I actually would like it to open in the frameset, target=main. So far I havent figured out how to alter the code so it does it. I have tried inserting

target=main

in various places in the code for the function gatekeeper, but havent got it to work as yet.

Thanks for suggestions

jock
 
Maybe, you can encrypt the password by a simple way, such as "h" -> "m", "m" -> "n", ...
 
Knock off the navbar.htm and you can see the frameset.

In your gatekeeper function:
1. I would change the name of the variable location. Location is a keyword, so change it to loc or something else.
2. You are using window.open to open the new location. This will open a new window as you say, so try this instead.
Code:
top.main.location.replace(loc);
Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top