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_s ave_stock.asp" method="post" name="MyFormDat a">
<input name="Make" type="text" id="MenuText" value=<% response.write
rsTable("Make") %size="50" maxlength="50">
<input name="DateBough t" id="MenuText" type="text" value=<% response.write
rsTable("DateBo ught") % 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_OnSu bmit = False "
Why ?
<Script language="vbscr ipt">
Function MyFormData_OnSu bmit()
Dim FormOkay
FormOkay=True
if isdate(MyFormDa ta.DateBought.V alue)=False then
msgbox "Error in date", vbokayonly+vbin formation,"Chec king Data"
MyFormData.Date Bought.SetFocus
FormOkay=False
end if
if FormOkay=False then
MyFormData_OnSu bmit = False
else
MyFormData_OnSu bmit = True
end if
end Function
</Script>
thankls
Mike.