Stephen Lime steve.lime at dnr.state.mn.us
Tue Feb 22 13:55:34 EST 2000


Remember that at present what you are actually sending to the mapserver is
a regular expression. I've not yet changed mapserver to allow string and logical
expression queries via itemquery. That being said, ()'s are special characters
in a regex and therefore need to be escaped to work properly. Try this snippet
of code (it should work):

<select name="value" size="1">
  <option> Big Fork River
  <option value="Big Sioux River \(Medary Creek\)"> Big Sioux River (Medary Creek)
  <option value="Big Sioux River \(Pipestone\)"> Big Sioux River (Pipestone)
  <option> Blue Earth River
</select>

Note the escaped ()'s (i.e. the backslash). The same treatment is necessary with 
all regex special characters.

Steve


Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> <bfischer at usgs.gov> 02/22/00 11:30AM >>>
Mapserver users,

     I ran into a problem when I use the itemnquery on a shapefile
attributes.  The value of the attribute in a shapefile is Mississippi River
(Brainerd).  The itemnquery works on all the values that do not have a
perenthesis.  Do I have to put a special charcter in HTML file to identify
the perenthesis?  The other solution would be to edit the shapefile's
attributes.

Here is the HTML code:
<select name="value" size="1">
  <option> Big Fork River
  <option> Big Sioux River (Medary Creek)
  <option> Big Sioux River (Pipestone)
  <option> Blue Earth River
</select>

Thanks,

Brian Fischer
bfischer at usgs.gov 
USGS WRD
2280 Woodale Dr.
Mounds View, MN
(612) 783-3133






More information about the mapserver-users mailing list