To read the article online, visit

User Tips: Iterating Through the Form Contents Using JScript

By Raf Q.

Here is how to check all your form or query fields with JScript as the server-side scripting language. Note: If you replace Request.form with Request.querystring, you get all your query elements!

function showFormData(){
  laAnswers = new Array();
  lnAnswerno = 0;
  Response.write("<table border=1>");
  for(e = new Enumerator(Request.Form); !e.atEnd(); e.moveNext()){
    laAnswers[lnAnswerno] = Request.Form(e.item());
      if (laAnswers[lnAnswerno] == "")
        Response.write("<tr><td>"+lnAnswerno+"</td><td>"+e.item() +
        Response.write("<tr><td>"+lnAnswerno+"</td><td>"+e.item() +
                       "</td><td>" +laAnswers[lnAnswerno]+"</td></tr>");


To learn more about JScript, study the JScript information on Microsoft's Scripting Site and read the following 4Guys articles:

Happy Programming!

Return to user tips...

Article Information
Article Title: User Tips: Iterating Through the Form Contents Using JScript
Article Author: Raf Q.
Article URL:

Copyright 2019 QuinStreet Inc. All Rights Reserved.
Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers