You are here: DEVPPL Forum Programming HTML Forum
NOTIFICATIONS
54.067
MEMBERS
15.678
TOPICS
62.243
POSTS
  562
FLASH GAMES
7.740
TUTORIALS
 

Login

E-mail:
Password:

Redirect using if function

0

Loading

Redirect using if function

Postby Johnfrankfu » Mon Nov 21, 2011 3:04 pm

Please help. I'm trying to use if function to redirect, but it is not working.

<html>
<head>

<p><fontface="Arial"size"3">Please enter the username.</p></head>

<scripttype="text/javascript"

function checkForm(form)
{
if(form.pdw1.value!="VOHASHAMK"){
alert("Username does not exist!");
form.pwd1.focus();
return false;
}
if(form.pdw1.value=="xxxxx"){
document.location = "http://xxxx.html"
}}
</script>

<form method="POST" action="/javascript/validate/1/" onSubmit="return(checkForm(this)&&false);">
<fieldset>
<label>Username:</label><span><input type="password" name="pwd1"></span>
<span><input type="submit" value="Login"></span>
</fieldset>
</form>
</html>
john.frankfu@gmail.com
Johnfrankfu
 
Reputation: 0
Posts: 1
Joined: Mon Nov 21, 2011 1:03 pm
Highscores: 0
Arcade winning challenges: 0

Redirect using if function - Sponsored results

Sponsored results

Login to get rid of ads

 

^ Back to Top