Advertisement

04.21.2008 at 08:13PM PDT, ID: 23341771
[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!

Help with data validation in java script

Tags: Coldfusion 8, Java Script, Mozilla, localhost
Attached below is a java script validation I use for a form that a user fills out.  Its works perfect.  I have another form with the exact same textbox id and names that I use for updating the info.  For some reason I can't get it to work.  Does this validation setup work when the text boxes are populated correctly when the form first loads?  I'm not getting any errors.  It just tries to process the form without running the java script.  I got the form setup exactly the same at the first form.
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:
function validateDate(elementName)
{
        var re = new RegExp(/\d\d-\d\d-\d\d\d\d/);
        var val = document.getElementById(elementName).value;
        if (!re.exec(val))
        {
                return false;
        }
        
        val = val.replace(/-/ig, "/");
        var dt = new Date(val);
        var now = new Date();
        if (dt > now && dt < now.setDate(now.getDate() + 90))
        {
                return true;
        }
        else
        {
                return false;
        }
}
 
function validateAll()
{
     var elem = document.forms[0].coupName;
      
     var alertTxt = "";
     alertTxt += isAlphabet(elem, "coupName");
     alertTxt += (document.getElementById('cDescription').value.length < 1)? "Please enter coupon description\r\n" : "";
     alertTxt += (document.getElementById('cDescription').value.length > 150)? "Please enter 150 or less characters\r\n" : "";
     alertTxt += (!validateDate('cDate')) ? "Please enter correct date\r\n" : "";
     if (alertTxt != "")
     {
         alert(alertTxt);
 
         return false;
     }    
}
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: sonicimpulse
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
04.21.2008 at 08:21PM PDT, ID: 21407926

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.21.2008 at 08:42PM PDT, ID: 21407986

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.21.2008 at 09:40PM PDT, ID: 21408134

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:36AM PDT, ID: 21410938

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:37AM PDT, ID: 21410950

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:42AM PDT, ID: 21410984

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:50AM PDT, ID: 21411058

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:51AM PDT, ID: 21411068

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 06:55AM PDT, ID: 21411107

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 07:12AM PDT, ID: 21411265

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 07:24AM PDT, ID: 21411373

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 07:34AM PDT, ID: 21411484

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 08:04AM PDT, ID: 21411806

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 08:10AM PDT, ID: 21411876

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 08:18AM PDT, ID: 21411963

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.22.2008 at 08:44AM PDT, ID: 21412255

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628