I have a simple form like this:
<form method="post" id="login">
Username: <input type="text" value="" name="usr" />
Password: <input type="password" value="" name="pw"/>
<input type="submit" id="log" name="log" value="Login" style="width:250px;"/><br/>
</form>
But i keep getting cannot read property for my javascript with this line:
var usr = login.usr.value;
var pw = login.pw.value;
What is the reason i get this error ?