|
target links within frames Posted: 25 May 2002 09:43 PM |
I implemented a password function in my page. In the function depending on the password they enter, it will take them to a different page. However, I'm also using this on a Frames page and don't want the page to open in the same frame the link is on. I tried targetting the URL to the other frame (name=body), but this isn't working; I am just getting script errors. Any help with how to target the URL's would be appreciated. The function is below.
function whereTo()
{
var password = prompt("What is your password","");
magic_word=password.toLowerCase();
if(magic_word == "jaremy")
{window.location = "http://www.tonawandaffl.com/jperry.html";}
else if (magic_word == "mikeo")
{window.location = "http://www.tonawandaffl.com/mopoka.html";}
else if (magic_word == "rob")
{window.location = "http://www.tonawandaffl.com/rball.html";}
else if (magic_word == "deek")
{window.location = "http://www.tonawandaffl.com/dpizur.html";}
else if (magic_word == "randy")
{window.location = "http://www.tonawandaffl.com/rtamburlin.html";}
else if (magic_word == "chris")
{window.location = "http://www.tonawandaffl.com/cluangpakdy.html";}
else if (magic_word == "brian")
{window.location = "http://www.tonawandaffl.com/bpimm.html";}
else if (magic_word == "mikeb")
{window.location = "http://www.tonawandaffl.com/mball.html";}
else
{alert("Invalid password. Try again.");}
}
|
|
|
 |
|
qsaaiman
|
 |
| Joined: 28 Jul 2004 |
| Total Posts: 21 |
| |
|
Re: Posted: 27 May 2002 01:43 AM |
Hey.
You ALMOST have it all you need to do is add the frame name.
{window.framename.location = "http://www.tonawandaffl.com/jperry.html";}
HTH
Quintin Saaiman
Department of Labour
IT Systems |
Quintin Saaiman |
|
 |
|