Hi,
My asp is currently do validate on client side only. When user click save it call function to validate and pop up alert box if there is an error. Now I need to add server side validation, to validate if product exist. If it doesn't then pop up the alert box. I don't know where to insert the change since it's server side validation. Can someone please help?
Thanks in advance
function to validate
my form
My asp is currently do validate on client side only. When user click save it call function to validate and pop up alert box if there is an error. Now I need to add server side validation, to validate if product exist. If it doesn't then pop up the alert box. I don't know where to insert the change since it's server side validation. Can someone please help?
Thanks in advance
function to validate
Code:
<script type="text/javascript" defer>
<!--
function check_input()
{
if (lTrim(product.value)=="")
{
alert ("Product# is Required");
product.focus();
return false;
}
// some more validate for other fields
document.f1.flag.value = "1"
return true;
}
-->
</script>
Code:
<form action="mypage.asp" method="post" name="f1">
/// some data input fields
<td><input type="image" name="save" value="f1" src="images/btn_save_cream.gif" border="0" onclick="return check_input();"></td>