Advertisement

08.11.2008 at 12:28PM PDT, ID: 23639041
[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!

6.2

JavaScript - onclick button to print out error messages

Asked by no158 in Scripting Languages, JavaScript

Tags: ,

I've been fooling around with this function and I'm trying to get it to work. Maybe one of you guys can put me back on track. So right below here is the function. I've been trying lots of things to get this to work so it might look a little messy.

function validation(form1)
{
        if (form1.first_name.value == '')
        {
            document.form1.getElementsByName("first_name_error").value = "*Missing first name";
            return false;
        }
        if (form1.last_name.value == '')
        {
             document.form1.getElementsByName("last_name_error").value = "*Missing last name";
             return false;
        }
        if (form1.company.value == '')
        {
             document.form1.getElementsByName("company_error").value = "*Missing company name";
             return false;
        }
        if (form1.email.value != '')
        {
             document.form1.getElementsByName("email_error").value = "*Missing email address";
             return false;
        }
          
          if (form.first_name.value != '' && form.last_name.value != ''
          && form.company.value != '' && form.email.value != '')
          {
                return true;
          }
          return false;
}
</script>

This is what I'm using to call it.
---------------------------------------
<html>
<form action="servlet URL" method="post" onsubmit="return validation(this)" />
<body>
<form id="form1" runat="server">
<asp:Button runat="server" text="Register" id="submit" />
<asp:Label id="first_name_error" runat="server" />         // Here is just one of the lables
<body>
</form>


I'm basically trying to make a validation check on input from the user to register for something. I'm trying to avoid using popups. So I have a button that will run a form action that calls a function that will do the validation. Problem is I can't get the code for the validation correct. Any thoughts?Start Free Trial
[+][-]08.11.2008 at 12:53PM PDT, ID: 22207600

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.

 
[+][-]08.11.2008 at 12:54PM PDT, ID: 22207606

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.

 
[+][-]08.11.2008 at 01:00PM PDT, ID: 22207654

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.

 
[+][-]08.11.2008 at 01:04PM PDT, ID: 22207682

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.

 
[+][-]08.11.2008 at 01:13PM PDT, ID: 22207748

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.

 
[+][-]08.11.2008 at 01:23PM PDT, ID: 22207830

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.

 
[+][-]08.11.2008 at 01:29PM PDT, ID: 22207876

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.

 
[+][-]08.11.2008 at 01:30PM PDT, ID: 22207892

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.

 
[+][-]08.11.2008 at 01:34PM PDT, ID: 22207929

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.

 
[+][-]08.11.2008 at 01:49PM PDT, ID: 22208071

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.

 
[+][-]08.11.2008 at 01:50PM PDT, ID: 22208078

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.

 
[+][-]08.11.2008 at 02:03PM PDT, ID: 22208205

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.

 
[+][-]08.11.2008 at 02:17PM PDT, ID: 22208347

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: Scripting Languages, JavaScript
Tags: .Net C# JavaScript, IE Firefox Opera Safari
Sign Up Now!
Solution Provided By: nivlam
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.12.2008 at 06:38AM PDT, ID: 22212927

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.

 
[+][-]08.12.2008 at 06:53AM PDT, ID: 22213069

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.

 
[+][-]08.12.2008 at 01:34PM PDT, ID: 22216863

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.

 
[+][-]08.13.2008 at 12:26PM PDT, ID: 22224755

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...
20081112-EE-VQP-42 / EE_QW_2_20070628