I have a JavaScript function [checkForm] which checks that the first “n” fields of a form are not blank - gets called when the form is submitted:
<form action="cdonts/premail.asp" method="post" id="form1" name="form1" language="javascript" onSubmit="return checkForm(2)">
But I find those Submit buttons a bit ugly so I want to use:
<A href="javascript:document.form1.submit();">post message<br></A>
It submits OK but it doesn’t trigger the checkForm – doesn’t seem to be the same submit.
Can anyone suggest a work around?
Bob.
<form action="cdonts/premail.asp" method="post" id="form1" name="form1" language="javascript" onSubmit="return checkForm(2)">
But I find those Submit buttons a bit ugly so I want to use:
<A href="javascript:document.form1.submit();">post message<br></A>
It submits OK but it doesn’t trigger the checkForm – doesn’t seem to be the same submit.
Can anyone suggest a work around?
Bob.