Select lists
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Fri Apr 28 07:55:25 PDT 2006
Jorge is correct. There's a reason too. With the standard pan/zoom/query interface there is little reason for the mode to be sticky. If you pan/zoom then setting the mode back to browse is all you really need. Queries are almost always dead-ends, that is, you don't query a query so a sticky mode doesn't make sense. There are always exceptions to the rule I suppose but that's why things are as they are. Easy enough to work around with a touch of javascript...
Steve
>>> "J. Parapar" <listario at GMAIL.COM> 4/28/2006 6:39:59 AM >>>
Hi Dave
I think (I may be wrong) the "_select" suffix does not work with
modes. It is usually used for layers and zoom factor values.
You can use JavaScript to get the efect by defining variables like:
var mode=[mode];
var dtype=[dtype];
and use JavaScript logic in the page load to set the selected values
of the lists according to this values.
Best regards,
Jorge
2006/4/28, DjwStone <D.Stone at ed.ac.uk>:
> Hi - I have a problem with select lists in MapServer 4.8.3 CGI.
>
> The template containing my interactive map is modelled on the 4.6 tutorial,
> so it contains select lists for the layers to display and the mode (defined
> CGI variables); also a list of location types (a 'user-defined' variable).
>
> I find that if I make (possibly multiple) selections from the 'layers' list,
> then when I call MapServer to re-draw the map, the selected list entries are
> still highlighted.
>
> However, for the 'mode' and 'location type' select lists, nothing I do seems
> to render the selections 'sticky' across a call of MapServer. This might be
> expected for the user-defined variable, but not 'mode'.
>
> The HTML is:
> <SELECT MULTIPLE NAME="layers" SIZE=3>
> <!-- the list of layers to choose from -->
> <OPTION VALUE="parish_labels" [parish_labels_select]> Parish
> names</OPTION>
> <OPTION VALUE="parish" [parish_select]> Parish boundaries</OPTION>
> <OPTION VALUE="saint_dedications" [saint_dedications_select]>
> Dedication types</OPTION>
> <OPTION VALUE="grid" [grid_select]> Graticule</OPTION>
> </SELECT><BR>
> Select map mode: <BR>
> <SELECT NAME="mode" SIZE=3>
> <OPTION VALUE="browse" [browse_select]> Browse</OPTION>
> <OPTION VALUE="query" [query_select]> Query 1 Layer</OPTION>
> <OPTION VALUE="nquery" [nquery_select]> Query Multiple Layers</OPTION>
> </SELECT><BR>
> Select type of dedication to plot on map: <BR>
> <select name='dtype' size=3 id='dtype' onchange='create_qstring()'>
> <option value=''> -- please select from this list --</option>
> <option VALUE='Aisle'> Aisle</option>
> <option VALUE='Altar dedication'> Altar dedication</option>
> <option VALUE='Bell'> Bell</option>
> - - - - etc.
> </select>
>
> Any suggestions gratefully received....
>
> Dave
>
>
> --
> View this message in context: http://www.nabble.com/Select-lists-t1523804.html#a4138182
> Sent from the Mapserver - User forum at Nabble.com.
>
More information about the MapServer-users
mailing list