why does error message blinks onsubmit
hi all
why does my validation error messages blink for a second on click of submit button
they dont stay static.
whats the solution
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
</head>
<script type="text/javascript">
function doValidate() {
if(document.registerform.textbox1.value= " ")
{
document.getElementById("hiddenDiv").innerHTML = "enter your email id its required";
}
if(document.registerform.textbox2.value= " ")
{
document.getElementById("hiddenDiv2").innerHTML = "enter your password id its required";
}
}
</script>
<body>
<form onsubmit="return doValidate();" method="post" name="registerform">
<input name="textbox1" id="textbox1" /><div id="hiddenDiv"></div>
<input name="textbox1" id="textbox2" /><div id="hiddenDiv2"></div>
<input type="submit" name="" value="Submit"/>
</form>
</body>
</html>
vineet