on my php page i have a submit button and when I submit i want to
validate that dome fields have data in.
i have this as my submit button
<input name="Enter" type="button" onClick="frmVal idate()" value="Submit">
and this is my javascript function
<script language='JavaS cript' type='text/javascript'>
function frmValidate()
{
if (frm.lName.valu e == '')
{
alert('Some required fields are empty!');
} else {
frm.submit
}
}
</script>
but it don't work can anyone see where i have gone wrong
is it because the page is .php instead of .html / .htm
thanks
Shane Jones.......... .......
validate that dome fields have data in.
i have this as my submit button
<input name="Enter" type="button" onClick="frmVal idate()" value="Submit">
and this is my javascript function
<script language='JavaS cript' type='text/javascript'>
function frmValidate()
{
if (frm.lName.valu e == '')
{
alert('Some required fields are empty!');
} else {
frm.submit
}
}
</script>
but it don't work can anyone see where i have gone wrong
is it because the page is .php instead of .html / .htm
thanks
Shane Jones.......... .......
Comment