Jump to content


Photo

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


  • Please log in to reply
2 replies to this topic

#1 laide234

laide234
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 14 September 2006 - 08:17 AM

Here is the 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>

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???

#2 manmadareddy

manmadareddy
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 14 September 2006 - 09:36 AM

onClick="return validateApply();"
try this

#3 laide234

laide234
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 14 September 2006 - 09:55 AM

Genius. That did the trick. Thanks a bunch. ;D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users