[Chameleon] LegendTemplate Widget - Combining checkbox and radio button layer selection

Jessica Deegan Jessica.Deegan at state.mn.us
Tue Jun 13 11:16:39 EDT 2006


Greetings List,
 
I am using an instance of LegendTemplate to control layer selection
via a Mapserver HTML template.
 
My problem is that I want to combine the use of both checkboxes
(for overlay kinds of layers) and radio buttons (for backgrounds). 
I have metadata in the mapfile that indicates this status. (a
snippet of code from the template is below)
 
Unfortunately, because the name element is the same for both radio
and checkbox inputs, a selection of a radio button will turn off all
the checkboxes (problem is limited to Internet Explorer).
 
I can't seem to track down where "legendgroupname[]" has roots, as
I initially duplicated the legend widget and tried to rename the
variable in a new widget.

Any advice is much appreciated!
Best regards,
Jessica
 
 
**********************************
  [if name=IsBackground oper=isnull]
  <p>
    <input type="checkbox" name="legendgroupname[]"
value="[leg_group_name]"
    [if name=layer_status oper=eq  value=1]CHECKED [/if]
    [if name=layer_status oper=eq value=2]CHECKED [/if]><span
class="label">[leg_group_name]</span>
       </p>
  [/if]
  [if name=IsBackground oper=isset]
     <p>
    <input type="radio" name="legendgroupname[]"
value="[leg_group_name]"
    [if name=layer_status oper=eq  value=1]CHECKED [/if]
    [if name=layer_status oper=eq value=2]CHECKED [/if]> &nbsp<span
class="label">[leg_group_name]</span>     </p>
  [/if]
[/if]

 
****************************
Jessica Deegan
GIS Analyst
Labor Market Information Office
MN Dept of Employment and Economic Development
332 Minnesota Street, Saint Paul, MN 55101
(office) 651/296.3739 | (fax) 282.5429
 
http://www.deed.state.mn.us/lmi 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060613/1c94d8d7/attachment.html


More information about the Chameleon mailing list