?
Solved

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

Posted on 2006-06-25
1
Medium Priority
?
170 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 2000 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

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

800 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