Hello Guys...
My name is ibrahim.Working as software engineer in SCPL,Hyderabad,INDIA. I didn't tried above all the blogs explained.. i just take Html submit button named "inLogin" .And written a javascript function named "ValidateControls()". and it worked fine on IE as well as In forefox browsers.
<script src="validation.js" type="text/javascript"></script> //my custom validation script file.
<script type="text/javascript">
function ValidateControls()
{
var usrid = document.getElementById("txtUserid").value;
var pwd = document.getElementById("txtPassword").value;
if (chkEMail(usrid,"Email-Id","Y") == "")
{
document.getElementById("txtUserid").focus();
return false;
}
else if(pwd == "")
{
alert('Please enter password');
document.getElementById("txtPassword").focus();
return false;
}
else
{
return true;
}
}
and call in in button click as below:
< inputt type="submit" value="Submit" onclick="return ValidateControls()" id="inLogin" name="inLogin">
Note :You dont need any custom validation file.... what ever you want to put ,you can put directly in javascript function...Make sure you have to use document.getElementbyId instead of document.all .... Its the big reason that microsoft asp.net validation controls are using document.all which is not working in non-IE browsers...
Happy Programming
Ibrahim.
</script>