This is a silly question but for the life of me i cannot solve it.
i have this coding in my
jsp file.
<html>
<head>
<script language="JavaScript" src="Header.js">
</script>
</head>
<body>
<form name="login" onsubmit="return checkPassword(document.login.username.value, document.login.password.value);">
Username: <input type=text name="username"><p>
Password: <input type=text name="password"><p>
<input type=submit value="Submit">
</form>
</html>
in the Header.js i have declared the function checkPassword like so..
function checkPassword(oldpass , newpass)
{
alert(oldpass)
alert(newpass)
}
The odd thing is it never enters this function when i click submit what's wrong