Jump to content

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


laide234

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???
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.