Javascript Form Validation
<p>I have a form in an asp page that has the following code to verify it when it is posted.</p>

<pre><code>&lt;%
sSubmitAction = ""
sSubmitAction = sSubmitAction &amp; "if (this.CheckValue.value != this.OrderTotal.value){confirm('The values do not match.'); this.CheckValue.focus(); return(false);}"
sSubmitAction = sSubmitAction &amp; "if (this.Authorisation.value.length &lt; 1){alert('You must enter the authorisation number to proceed.'); this.Authorisation.focus(); return(false);}"
%&gt;
</code></pre>

<p>I want to replace that code with a javascript function that is called when the form is posted.</p>

<p>The Authorisation is a required field and I want the user to have the option to continue or cancel after they have been alerted that the CheckValue and OrderTotal fields do not match.</p>
