[mapserver-users] Create a button for Query
Pietro Giannini
pgiannini at bytewise.it
Thu Jan 29 02:35:45 PST 2009
There is not another way than use javascript.
The mapserver cgi receive the "mode" (can be "map", "browse",
"query","nquery"...) parameter from the template because the template
contains - in the form which do a "submit()" - a control named "mode".
The drop-down list sure is named "mode", so there can be not another
control - e.g. a hidden field - named "mode".
The only way is making a button like:
<input type"button" value="query the map"
onclick="javascript:document.forms['mapserv'].mode.value='query';" />
A click on button change the drop-down value in "browse", and a click on
the map will submit the url with a parameter like "... &browse=query..."
... At this point you can also prefer to change the drop-down with a
series of buttons, one for each "mode" you want, each button changing the
value of an hidden field named "mode"...
ciao ...................pg
--
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E
On Gio, Gennaio 29, 2009 04:25, boesiii wrote:
>
> My current html template has a drop down list for map modes, browse,
> single
> layer query and multi-layer query. I would like to have a single button
> for
> querying. Will I have to use javascript or is there a simpler way?
> --
> View this message in context:
> http://n2.nabble.com/Create-a-button-for-Query-tp2236684p2236684.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list