[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

Form Validation +

Asked by bvinson in JavaScript

Tags: form, validation, volphone

I have a form which I need to validate.

It is part of a dynamically created site and the HTML looks like this:

<FORM action="doaddvol.asp" method="post">
<TABLE cellspacing="0" cellpadding="3" border="0">
<TR>
      <TD COLSPAN="5" class="headbox" align="center">
            <span class="headtxt"><CENTER>New Instructor Event  Instructors</span></CENTER>
      </TD>
</TR>
<TR>
      <TD COLSPAN="5">
            <CENTER><span class="smtxt">Click on the Instructor to edit / remove.</span></CENTER>
      </TD>
</TR>      
<TR>
      <TD align="center"><b>First Name</b></TD>
      <TD align="center"><b>Last Name</b></TD>
      <TD align="center"><b>Phone Number</b></TD>
      <TD align="center"><b>Function</b></TD>
      <TD align="center"><b>Entered By</b></TD>                        
</TR>      
<TR>
      <TD align="center"><INPUT TYPE="text" Name="VolFirst"></TD>
      <TD align="center"><INPUT TYPE="text" Name="VolLast"></TD>
      <TD align="center"><INPUT TYPE="text" Name="VolPhone" Size="12"></TD>
      <TD align="center"><SELECT Name="EventJob">
            <OPTION Value="Instructor">Instructor</OPTION>
            <OPTION Value="Co-Instructor">Co-Instructor</OPTION>
            <OPTION Value="Leader">Leader</OPTION>
            <OPTION Value="Inst. Trainer">Inst. Trainer</OPTION>
            <OPTION Value="Co-Inst. Trainer">Co-Inst. Trainer</OPTION>
                  </SELECT>
      </TD>
      <TD align="center"><INPUT TYPE="hidden" Name="EnteredBy" Value="bvinson">bvinson</TD>
</TR>
<TR>
      <TD align="center"><INPUT TYPE="text" Name="VolFirst"></TD>
      <TD align="center"><INPUT TYPE="text" Name="VolLast"></TD>
      <TD align="center"><INPUT TYPE="text" Name="VolPhone" Size="12"></TD>
      <TD align="center"><SELECT Name="EventJob">
            <OPTION Value="Instructor">Instructor</OPTION>
            <OPTION Value="Co-Instructor">Co-Instructor</OPTION>
            <OPTION Value="Leader">Leader</OPTION>
            <OPTION Value="Inst. Trainer">Inst. Trainer</OPTION>
            <OPTION Value="Co-Inst. Trainer">Co-Inst. Trainer</OPTION>
                  </SELECT>
</TD>
      <TD align="center"><INPUT TYPE="hidden" Name="EnteredBy" Value="bvinson">bvinson</TD>
</TR>
<TR>
      <TD>0 of 2</TD>
      <TD><INPUT TYPE="Reset"><INPUT TYPE="hidden" Name="EventID" Value= "55" align="right"></TD>
      <TD><INPUT TYPE="Submit" Value="Add Instructors"></TD>
</TR>
<TR>
</TABLE>
</FORM>

OK.  What happens when this form is submitted is that it goes to an ASP page which parses through the fields and inserts them into a database.  I have the ASP page looking at the arrays that are sent over and entering the info only if the VolFirst field contains information.  A problem is coming up in that you can enter the VolFirst and not the Phone.  The database script dies if the VolPhone field is empty.

I need to use an advanced form validation to look through the form submission and if the VolFirst field contains information, then it checks to see if the VolPhone instance also contains information and stops the submission if it does not.  If there are multiple fields (such as in the example) I want users to be able to enter information in the first line but not in the second and the form validate successfully.  Also, of course, they should be able to enter in all the fields and have a successful validation.

Its 5:00 on Friday, so I may not be able to check for correct responses until Monday.

Thank you in advance for your assistance.
bvinson
[+][-]05/13/05 03:12 PM, ID: 14000115Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/13/05 04:12 PM, ID: 14000460Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/13/05 04:30 PM, ID: 14000534Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/13/05 06:40 PM, ID: 14000888Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/13/05 06:44 PM, ID: 14000901Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/13/05 06:54 PM, ID: 14000921Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/13/05 07:20 PM, ID: 14000961Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: JavaScript
Tags: form, validation, volphone
Sign Up Now!
Solution Provided By: Zyloch
Participating Experts: 1
Solution Grade: A
 
[+][-]05/13/05 07:34 PM, ID: 14000986Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89