reading string queries into javascript

Chad Nielsen cnielsen at co.tillamook.or.us
Fri Apr 13 14:27:06 EDT 2001


Hi,

I'm having problems reading string variables from a query into javascript.

T = Township (a number)
TDIR = Township Direction ( a character 'N' or 'S')

This works:

   var T = [T];
   .
   .
   .
   document.write(T);


This does not work, it comes out 'undefined':

   var TDIR = [TDIR];
   .
   .
   .
   document.write(TDIR);

The problem I'm guessing is with javascript wanting quotes around the
string. Is there an escape sequence for adding quote while reading a query
variable?

Thanks a bunch,
Chad

Chad M. Nielsen, GIS Programmer/Analyst
Tillamook County Performance Partnership (TCPP)
Tillamook Coastal Watershed Resource Center (TCWRC)

  GIS:   http://gisweb.co.tillamook.or.us
 TCPP:   http://www.co.tillamook.or.us/countygovernment/Estuary/homepage.htm
TCWRC:   http://www.tcwrc.org





More information about the mapserver-users mailing list