Hi
I'm using vbscript to Validate a form.
i first check if the text box contains anything and if not i pop up a msg and i want the focus to remain on that textbox and not submit the form.
<script language=vbscript>
sub check()
if document.find.text1.value="" then
msgbox "Enter some name to find the
corresponding address."
(what should i write here)
else
document.find.submit
end if
end sub
</script>
<form name="find" action="procs.asp" method=post>
<P><INPUT id=text1 name=txtName> </P>
<P><INPUT id=submit1 name=submit1 type=submit value=Find onclick="check()"></P>
</form>
I'm using vbscript to Validate a form.
i first check if the text box contains anything and if not i pop up a msg and i want the focus to remain on that textbox and not submit the form.
<script language=vbscript>
sub check()
if document.find.text1.value="" then
msgbox "Enter some name to find the
corresponding address."
(what should i write here)
else
document.find.submit
end if
end sub
</script>
<form name="find" action="procs.asp" method=post>
<P><INPUT id=text1 name=txtName> </P>
<P><INPUT id=submit1 name=submit1 type=submit value=Find onclick="check()"></P>
</form>