implementing "select/deselect all layers" option

Tom Kralidis tomkralidis at hotmail.com
Fri Jan 19 14:15:45 EST 2001


Hi,

I'm trying to implement a checkbox button within my html template which, 
when the user checks it, it will loop over each defined layer in the form, 
and check it off if it is not checked, then rewrite the URL to reflect all 
layers.

The output html page works fine with the [xlayer_check] hook, but the 
"select/deselect all" checkbox comes up unselected.  I imagine this is 
because the template does not have a hook for the CGI to check this.

Here's the HTML chunk:

  <INPUT TYPE="checkbox" NAME="layer" VALUE="gcdb_allpts" 
[gcdb_allpts_check] ONCLICK="ja
vascript:layerToggle('gcdb_allpts','0');">GCDB Points<BR>

  <INPUT TYPE="checkbox" NAME="layer" VALUE="cities" [cities_check] 
ONCLICK="javascript:l
ayerToggle('cities','1');">Cities<BR>

  <INPUT TYPE="checkbox" NAME="layer" VALUE="rivers" [rivers_check] 
ONCLICK="javascript:l
ayerToggle('rivers','2');">Rivers<BR>

  <INPUT TYPE="checkbox" NAME="layer" VALUE="lakes" [lakes_check] 
ONCLICK="javascript:lay
erToggle('lakes','3');">Lakes<BR>

  <INPUT TYPE="checkbox" NAME="layer" VALUE="roads" [roads_check] 
ONCLICK="javascript:lay
erToggle('roads','4');">Roads<BR>

  <INPUT TYPE="checkbox" NAME="allnone" VALUE="0" 
ONCLICK="javascript:layerToggle('allnon
e','nil');"><I>Show All</I>

I tried making the 'allnone' checkbox name "layer" and value "allnone", with 
a [allnone_check] hook, but no luck.  Perhaps this does not work because it 
is not a layer?  How can the mapserv app interact with this?

Any suggestions?

Thanks

..Tom
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




More information about the mapserver-users mailing list