This is really starting to annoy me,
I've got a form, that has some input boxes,
a example of the code is here:-
<form action="admin_save_stock.asp" method="post" name="MyFormData">
<input name="Make" type="text" id="MenuText" value=<% response.write
rsTable("Make") %size="50" maxlength="50">
<input name="DateBought" id="MenuText" type="text" value=<% response.write
rsTable("DateBought") % size="10" maxlength="10">
</form>
I also have a FUNCTION that checks to make sure the dates etc are correct :-
But, the code will work as far as giving me the error MSGBOX
but it still posts to the next page for some reason its
ignoring the " MyFormData_OnSubmit = False "
Why ?
<Script language="vbscript">
Function MyFormData_OnSubmit()
Dim FormOkay
FormOkay=True
if isdate(MyFormData.DateBought.Value)=False then
msgbox "Error in date", vbokayonly+vbinformation,"Checking Data"
MyFormData.DateBought.SetFocus
FormOkay=False
end if
if FormOkay=False then
MyFormData_OnSubmit = False
else
MyFormData_OnSubmit = True
end if
end Function
</Script>
thankls
Mike.