Advertisement

09.05.2008 at 10:47AM PDT, ID: 23707108
[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.3

mixed form validation (checkbox, select, text)

Asked by meldraper in Active Server Pages (ASP), JavaScript

Tags: ,

I have a form in an ASP page and I have a nice little Javascript form field validator that works very well except I cannot figure out how to make it work for checkboxes.  I have three checkboxes in my form but only one needs to be chosen; they can choose all three, but only one is required.  My script and form code is included.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
<script LANGUAGE="JavaScript">
<!-- Begin
function checkEmail(myForm) {
 
if(!myForm.cert.checked) {
  alert("Please choose a certification type.");
      return false;}
 
if (myForm.fname.value == ""){
 alert("First name is required");
 myForm.fname.focus();
 return false;}
 
if (myForm.lname.value == ""){
 alert("Last name is required");
 myForm.lname.focus();
 return false;}
 
if (myForm.amount.value == ""){
 alert("Amount is required");
 myForm.amount.focus();
 return false;}
 
 
if (myForm.email.value == ""){
 alert("Email is required");
 myForm.email.focus();
 return false;}
 
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
myForm.email.focus();
return (false)
}
 
//put this in the <form> tag 
//
//  End -->
</script>
 
<form method="post" onSubmit="return checkEmail(this)">
<table style="border-style:inset; border-width:medium" width="100%">
<tr><td colspan=2 align="center"><font color="#CC0000">*</font> denotes a required field</td></tr>
<tr><td><font color="#CC0000">*</font>Certification Type<td>Please check all that apply<br>
<input type="checkbox" name="cert" value="CMC">CMC&nbsp;<input type="checkbox" name="cert" value="CMIS">CMIS&nbsp;<input type="checkbox" name="cert" value="CMOM">CMOM</td></td></tr>
<tr><td><font color="#CC0000">*</font>First Name<td><input type="text" name="fname" size=40></td></td></tr>
<tr><td><font color="#CC0000">*</font>Last Name<td><input type="text" name="lname" size=40></td></td></tr>
<tr><td>Certification ID Number<br><span style="font-size:10px">(preferred but not required)</span><td><input type="text" name="certid" size=40></td></td></tr>
<tr><td><font color="#CC0000">*</font>Amount Paid<td>
<select name="amount">
<option selected>Select amount</option>
<option value="75">$75.00 for one</option>
<option value="125">$125.00 for two</option>
<option value="150">$150.00 for all three</option>
</select></td></td></tr>
<tr><td><font color="#CC0000">*</font>Email Address<td><input type="text" name="email" size=40></td></td></tr>
 
<tr><td><td><input type=submit value="Pay Securely with Credit Card" name=btRenew >&nbsp;<input type=reset value=Reset></td></tr>
</table>
 
Loading Advertisement...
 
[+][-]09.05.2008 at 11:20AM PDT, ID: 22402007

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 11:26AM PDT, ID: 22402083

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 11:30AM PDT, ID: 22402117

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 11:42AM PDT, ID: 22402255

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 11:55AM PDT, ID: 22402408

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 11:59AM PDT, ID: 22402446

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:10PM PDT, ID: 22402584

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:18PM PDT, ID: 22402685

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:25PM PDT, ID: 22402768

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:26PM PDT, ID: 22402793

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:29PM PDT, ID: 22402829

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:30PM PDT, ID: 22402844

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:31PM PDT, ID: 22402845

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 12:44PM PDT, ID: 22402977

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 01:00PM PDT, ID: 22403162

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 01:02PM PDT, ID: 22403186

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 01:07PM PDT, ID: 22403235

View this solution now by starting your 7-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

Zones: Active Server Pages (ASP), JavaScript
Tags: javascript, IE
Sign Up Now!
Solution Provided By: Chrissteven81
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.05.2008 at 01:08PM PDT, ID: 22403254

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628