Advertisement

09.14.2006 at 01:02PM PDT, ID: 21990042
[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

Classic ASP VBScript:  Server-Side Form Validation

Asked by lshane in Active Server Pages (ASP)

Tags: , , , ,

Hello.  I am using Classic ASP VBScript.  I am testing server-side validation with a small, 2-field form.  I think I may be on the right track, but I'm unsure how to separate the 2 fields and I would like to retain the entered value for the correct field when the page displays error for the incorrect field.  It is validating for a numeric entry on both fields.

Here's a link to the form: <www.lghmedia.com/test/test_form.asp>

2 files:  <test_form.asp> and <test_form_process.asp>.

"Test_form.asp" has 2 fields:  {numProd, numVend}.

The "test_form.asp" file submits to "test_form_process.asp" for validation.  I created a separate "IF...THEN" statement for each form field which redirect back to the "form_test.asp" page with a respective variable if not validated:

=========================================================
<% If Not IsNumeric(Request.Form("numProd")) Then
      Response.Redirect("test_form.asp?error=numProdnotnumeric")
END IF
%>

<% If Not IsNumeric(Request.Form("numVend")) Then
      Response.Redirect("test_form.asp?error=numVendnotnumeric")
END IF
%>
=========================================================
=========================================================

Here is the code for the error messages to display on "test_form.asp"

=========================================================
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
     
            <% If Request.QueryString("error") = "numProdnotnumeric" Then %>
            <tr>
        <td colspan="2"><font color="#FF0000">Please enter a quantity of products.</font></td>
        </tr>
            <%END IF%>
      <tr>
        <td width="120">Number Products:</td>
        <td width="280"><input name="numProd" type="text" id="numProd" size="30"></td>
      </tr>

        <% If Request.QueryString("error") = "numVendnotnumeric" Then %>
      <tr>
        <td colspan="2"><font color="#FF0000">Please enter a quantity of vendors.</font></td>
        </tr>
      <%END IF%>
      <tr>
        <td>NumberVendors:</td>
        <td><input name="numVend" type="text" id="numVend" size="30"></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><input type="submit" name="Submit" value="Submit"></td>
      </tr>
    </table>
=========================================================
=========================================================

1) How can I get the display for each invalid field?
2) After being redirected due to an invalid entry, how can I get the fields to retain the entries that were made?


Thanks so much,
ShaneStart Free Trial
[+][-]09.14.2006 at 01:23PM PDT, ID: 17524080

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.14.2006 at 01:54PM PDT, ID: 17524356

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.14.2006 at 03:06PM PDT, ID: 17524824

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.14.2006 at 03:16PM PDT, ID: 17524882

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.14.2006 at 03:17PM PDT, ID: 17524891

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.14.2006 at 03:40PM PDT, ID: 17525053

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.14.2006 at 04:01PM PDT, ID: 17525164

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.14.2006 at 04:26PM PDT, ID: 17525270

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.14.2006 at 04:28PM PDT, ID: 17525280

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.14.2006 at 04:41PM PDT, ID: 17525344

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.14.2006 at 05:13PM PDT, ID: 17525678

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.14.2006 at 05:29PM PDT, ID: 17525754

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.14.2006 at 06:23PM PDT, ID: 17526000

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.14.2006 at 08:16PM PDT, ID: 17526487

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.14.2006 at 08:39PM PDT, ID: 17526562

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

Zone: Active Server Pages (ASP)
Tags: asp, classic, form, validation, vbscript
Sign Up Now!
Solution Provided By: b0lsc0tt
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.14.2006 at 10:15PM PDT, ID: 17526842

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.15.2006 at 09:33AM PDT, ID: 17530749

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.15.2006 at 10:19AM PDT, ID: 17531040

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.15.2006 at 10:25AM PDT, ID: 17531087

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.15.2006 at 10:29AM PDT, ID: 17531107

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.15.2006 at 10:48AM PDT, ID: 17531234

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