Hi,
I learning javascript and now doing a simple validation however i'm coming across an issue. See code below
Html
Code:
<form name="loginsubmit" method="post" action="adproperties.html"></form>
Javascript
Code:
<script>
// this is for the login validation
function loginvalidation()
{
if(document.loginsubmit.usernameform == '' );
alert('Please enter your username');
return false;
}
</script>
The issue that i'm having is when the username is submited with no text, the alert will appear, but even when I include text it still appears and doesn't go to the selected link.
Help would be appreciated.