Show me a Simple javascript onSubmit handler 
<p>Hello again everyone
i am working on this</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
 &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
&lt;head&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Form&lt;/title&gt;
&lt;script type="text/javascript"&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h2&gt;**Form**&lt;/h2&gt;
&lt;form  name=form method="post" action="javascript" subject=RSVP" enctype="text/plain" &gt;
&lt;input type=text name="first" size="20"&gt; First Name&lt;BR&gt;
&lt;input type=text name="last" size="20"&gt; Last Name&lt;BR&gt;
&lt;input type="text" name="email" size="20"&gt; E-Mail&lt;BR&gt;&lt;BR&gt;
&lt;input type="submit" value="Submit"&gt;
&lt;input type="reset" value="Clear Form"&gt;&lt;br&gt;
&lt;/form&gt;
 &lt;/body&gt;
 &lt;/html&gt;
</code></pre>

<p>I am getting really confused here.. I need to have a onsubmit form handler and a create validation script. Ok now if I am right the validation script is the the function that needs to be placed right? sorry i know some of you guys might think this is easy but I am still learning. Now I have examples in my book of it but they only due one at a time. Is there a way you can do a onsubmit of all or does it have to be one at a time? thanks</p>

<p>ok I have this one i am working on..</p>

<pre><code>  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
   &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
   &lt;head&gt;
   &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;
    &lt;title&gt;Form&lt;/title&gt;
   &lt;script type="text/javascript"&gt;
    &lt;!--
   function validate_form()
    {
valid = true;

    if ( document.contact_form.contact_first.value == "" )
    {
            alert ( "Please fill in the 'Your Name' box." );
            valid = false;
     }

    return valid;
     }

 //--&gt;

 &lt;/script&gt;
 &lt;/head&gt;
  &lt;body&gt;
 &lt;h2&gt;**Form**&lt;/h2&gt;
 &lt;form  name="contact_form"  method="post" action="javascript" onSubmit="return  validate_form();"&gt; 
 &lt;input type=text name="contact_first" size="20"&gt; First Name&lt;BR&gt;
 &lt;input type=text name="contact_last" size="20"&gt; Last Name&lt;BR&gt;
 &lt;input type="text" name="contact_email" size="20"&gt; E-Mail&lt;BR&gt;&lt;BR&gt;
 &lt;input type="submit" value="Submit"&gt;
 &lt;input type="reset" value="Clear Form"&gt;&lt;br&gt;
 &lt;/form&gt;



 &lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>now Can i just copy the function for the other two or how do i do the one for the email?</p>
