Solved

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

Posted on 2006-06-25
1
169 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

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…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

724 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