if Request.Form("field") > 0...
Or what are you looking for?
Printable View
if Request.Form("field") > 0...
Or what are you looking for?
You'll want to do this in client side javascript...
The onBlur event will fire when the control loses focus and is one place to put it. Also in the onSubmit event of the form is another good place to validate fields.
If you are using ASP, then you can easily validate it on the server. Just do:
Code:If Len(Request.Form("yourfield")) > 0 Then
'valid
End If
Interested in the onSubmit event. Not sure how to do it, have no clue about javascript..Would you be willing to help?
Thanks
Code:<SCRIPT language=javascript>
function myform_onSubmit()
{
if(myform.mytext.value < 0)
{
window.alert("Enter a value > 0");
return false;
}
return true;
}
</SCRIPT>