I am having trouble getting this small login script to work – simply – someone enters a password in the field name ‘ftext’ and the secure webpage opens.
I am getting the If / else statments working fine – but the url doesn’t open.
if replace:
location.href=’
with
alert(“Good!”);
The function works? How do i get it to open the URL?
I’m a newbie.. any help is appreciated..
<script language = “javascript”>
function Login1()
{
var ftext = document.login.ftext.value;
if(ftext == ‘enter’)
{
location.href=’
}
else
{
alert(“incorrect password”);
}
}
</script>
<FORM NAME=”login” onSubmit=”return Login1()”>
login: <INPUT TYPE=TEXT NAME=ftext><BR>
<INPUT TYPE=submit VALUE=”Done”>
</FORM>