Quote Originally Posted by monte96
Make your submit buttons normal buttons and in their 'onClick' event handler, call the validation function. Put the Form.submit() at the end of the function and if one of the validations fail, alert the user and 'return' so it never gets to the submit. You could even set the focus to the offending field for them to fix.
I followed your instructions but I get error: Object doesn't support this property or method: 'frmTPOnline.submit'

HTML Code:
<!-- Data Validation-->
<SCRIPT LANGUAGE = "VBScript">
Sub Submit_OnClick()
	if frmTPOnline.txtquantity.value = "" then 
		MsgBox "empty!"
		exit Sub
	else
		msgbox "OK!"
	end if

frmTPOnline.submit()

End Sub
</SCRIPT>