Jump to content

Archived

This topic is now archived and is closed to further replies.

laide234

**solved** What is wrong with this form?

Recommended Posts

Here is the code...

[code]     
<form action="processApp.php?action=apply" method="post" enctype="multipart/form-data" name="apply" id="apply">
  <tr>
        <td><div align="right"><strong>*Applicant's Name:&nbsp;</strong></div></td>
        <td><input name="name" id="name" type="text" size="40" maxlength="30"></td>
      </tr>
      <tr>
        <td><div align="right"><strong>*Applicant's Email Address:&nbsp;</strong></div></td>
        <td><input name="email" id="email" type="text" size="40" maxlength="30"></td>
      </tr>
      <tr>
        <td colspan="2"><hr width="350"></td>
        </tr>
      <tr>
        <td><div align="right"><strong>Work Phone:&nbsp;</strong></div></td>
        <td><input name="wPhone" id="wPhone" type="text" size="40" maxlength="20"></td>
      </tr>
      <tr>
        <td><div align="right"><strong>Home Phone:&nbsp;</strong></div></td>
        <td><input name="hPhone" id="hPhone" type="text" size="40" maxlength="20"></td>
      </tr>
      <tr>
        <td><div align="right"><strong>Cell Phone:&nbsp;</strong></div></td>
        <td><input name="cPhone" id="cPhone" type="text" size="40" maxlength="20"></td>
      </tr>
      <tr>
        <td colspan="2"><hr width="350"></td>
        </tr>
      <tr>
        <td><div align="right"><strong>Paste your resume and/or cover letter here</strong></div></td>
        <td rowspan="2"><textarea name="resume" id="resume" cols="36" rows="10"></textarea></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td><input name="submitApp" id="submitApp" type="image" onClick="validateApply();" src="..//images/submit_app_button.gif" width="120" height="20" border="1"></td>
      </tr>
  </form>[/code]

When I click on the image, it submits. I was going to add some form validation (and a submit(); )to "validateApply();" , but data is being sent with or without the submit. I even put a simple alert() in validateApply(), just to test it. But I get the alert, and then data is sent. I want to be able to control this with validation and a submit().

I do not want to access processApp.php until I am sure there is data in the fields.

What am I missing???

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.