Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

Script Library

  Echo URL name/value parameters
  chubbard posted this script:
  request.getParameter() works well if you happen to know the names of the parameters that are being passed into your function.  But if you don't know them, getParameter won't help.  Here's a quick and dirty function that parses the query string portion of a URL, and grabs the name-value pairs of the parameters.  Of course, for this to work, the data has to be in the while forms submitted via GET will work with this, forms with method=POST will not.

webcall function echo() {

  // Split the query portion of the string into name-value pairs (on the "&" symbol).
  // queryArray elements will be strings of "<paramName>=<paramValue>" format.
  var queryString = request.getQueryString();
  var queryArray = queryString.split("&");

  // Iterate through the array of name-value pairs
  for (var i=0; i<queryArray.length; i++) {
    // set pName to the parameter name, ie the text before the "="
    var pName =
    // set pVal to the parameter value, ie the text after the "="
    var pVal =

    // Output the name-value pair
      <%= pName %> = <%= pVal %><BR>

Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us