Solved: Javascript Help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

lumentec

Thread Starter
Joined
Mar 23, 2008
Messages
103
See any problems?

Code:
<script type="text/javascript">

function check() {
if (document.signup.username.value=="" || document.signup.password.value=="" || document.signup.password2.value=="" || document.signup.email.value=="" || document.signup.name.value=="") {
alert("Fill out all parts of the form.");
}

if else (document.signup.password.value != document.signup.password2.value) {
alert("Passwords do not match.");
}


if else (document.signup.email.value.indexOf("@")<=0 || document.signup.email.value.indexOf(".")<=0) {
alert("Invalid Email address. Enter a valid email address and re-submit.");
}

if else (document.signup.username.value.length<4 || document.signup.password.value.length<6 || document.signup.email.value.length<7) {
alert("Username must be at least 4 characters long. /n Password must be at least 6 characters long. /n Email address must be at least 7 characters long.");
}



else {
document.signup.submit();
}

}



</script>
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top