Select lists

DjwStone D.Stone at ED.AC.UK
Fri Apr 28 09:08:53 PDT 2006


Thanks, Jorge, finally got it to work!

Cheers,

Dave

J. Parapar wrote:
> 
>   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.
>>
> 
> 
--
View this message in context: http://www.nabble.com/Select-lists-t1523804.html#a4143257
Sent from the Mapserver - User forum at Nabble.com.



More information about the MapServer-users mailing list