hi people,
I am weak in most computer aspects, i think because of my school.
I am creating this website and inside it there is a registration page. I used tables to create this page. So, text fields, radio buttons and check boxes belong to different forms.
I want to use javascript to make sure that the "username","password" and "confirm_password" fields don't stay blank. A user must fill the
How can i do this?
What I have done:
<script type="text/javascript">
var username;
var password;
var cp=cfpassword;
function alert()
{
if username=""{
alert('Please fill the user name');
}
else if password=""{
alert('Please fill the password');
}
else if password=!cfpassword{
alert('Passwords do not match');
}
}
</script>
and on the submit button i put this;
<input type="submit" name="Register" id="Register" value="Register" onclick="alert()" />
Please help me.....