Solved

I have my form setup to check certain fields, to make sure they are filled.

Posted on 2006-06-25
1
168 Views
Last Modified: 2010-04-09
I have my form setup to check certain fields to make sure they are field in and it seems to be working, But when it finds a field not filled in it will send an alert to fill in that information, but when you click out of the alert message it will try and send the form. It will not go back to the form to make corrections. Here is some of the form. It is alot bgger than this, but these are the key areas.

<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Name/Club Position:<input name="size91" type=text id="name-position" value="" size=132  MAXLENGTH=102></TD></TR>
  <TR>
    <TD width="100%">Street Address:<input name="size93" type=text id="street" value="" size=144  MAXLENGTH=104></TD></TR>
  <TR>
    <TD width="100%">City/Sate/Zip:<input name="size95" type=text id="state-zip" value="" size=139  MAXLENGTH=109></TD></TR>
  <TR>
    <TD width="100%">Phone Number with Area Code:<input name="size97" type=text id="phone" value="" size=120  MAXLENGTH=100></TD></TR>
  <TR>
    <TD width="100%">Email Address:<input name="size99" type=text  MAXLENGTH=108 size=138 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<P align="center">
  <input type="Submit" value="Submit" onclick="verify();" />
0
Comment
Question by:starview
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 36

Accepted Solution

by:
Zyloch earned 500 total points
ID: 16979471
Instead of putting it on onclick, you can do:

<form onsubmit="return verify();">

and make sure verify() returns false if there is an error and true otherwise.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question