<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV dir=ltr align=left><SPAN class=230453923-13062006>Jessica,</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006>I think you could get
away with modifying the bit around line 539-575 of LegendTemplate.widget.php,
and then making sure that the name of the inputtype of the radiobuttons in
your legendtemplate is set to something other than "legendgroupname".
Alternatively, you could put radiobuttons in your template, and use "onChange"
and some javascript to change the value of hidden form elements, to turn layers
on or off. But that might be more complicated.</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006>regards,</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006>Jacob</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=230453923-13062006></SPAN> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<B>From:</B> chameleon-bounces@lists.maptools.org
[mailto:chameleon-bounces@lists.maptools.org] <B>On Behalf Of </B>Jessica
Deegan<BR><B>Sent:</B> 13 June 2006 23:17<BR><B>To:</B>
Chameleon-users<BR><B>Subject:</B> [Chameleon] LegendTemplate Widget -
Combining checkbox and radiobutton layer selection<BR><BR></DIV>
<DIV></DIV>
<DIV>Greetings List,</DIV>
<DIV> </DIV>
<DIV>I am using an instance of LegendTemplate to control layer selection via a
Mapserver HTML template.</DIV>
<DIV> </DIV>
<DIV>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)</DIV>
<DIV> </DIV>
<DIV>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).</DIV>
<DIV> </DIV>
<DIV>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.<BR><BR>Any advice is much appreciated!<BR>Best regards,</DIV>
<DIV>Jessica</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>**********************************<BR> [if name=IsBackground
oper=isnull]<BR> <p><BR> <input
type="checkbox" name="legendgroupname[]"
value="[leg_group_name]"<BR> [if name=layer_status
oper=eq value=1]CHECKED [/if]<BR> [if
name=layer_status oper=eq value=2]CHECKED [/if]><span
class="label">[leg_group_name]</span><BR>
</p><BR> [/if]<BR> [if name=IsBackground
oper=isset]<BR> <p><BR>
<input type="radio" name="legendgroupname[]"
value="[leg_group_name]"<BR> [if name=layer_status
oper=eq value=1]CHECKED [/if]<BR> [if
name=layer_status oper=eq value=2]CHECKED [/if]> &nbsp<span
class="label">[leg_group_name]</span>
</p><BR> [/if]<BR>[/if]<BR></DIV>
<DIV> </DIV>
<DIV>****************************<BR>Jessica Deegan<BR>GIS Analyst<BR>Labor
Market Information Office<BR>MN Dept of Employment and Economic
Development<BR>332 Minnesota Street, Saint Paul, MN 55101<BR>(office)
651/296.3739 | (fax) 282.5429</DIV>
<DIV> </DIV>
<DIV><A
href="http://www.deed.state.mn.us/lmi">http://www.deed.state.mn.us/lmi</A>
</DIV></BLOCKQUOTE></BODY></HTML>