If a checkbox is unchecked, the browser will send nothing to you.&nbsp; Only if the box is checked will you get a name=value pair.<br><br><div class="gmail_quote">On Wed, Jun 4, 2008 at 1:43 PM, ken uhl &lt;<a href="mailto:kenuhl@berkeley.edu">kenuhl@berkeley.edu</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
I have a question on how to determine the value of a checkbox ( checked<br>
or unchecked ) when<br>
passing check boxes as hidden fields to a separate cgi.<br>
<br>
The checkboxes are all all the named &#39;tagbucket&#39;<br>
with different values,<br>
so I retrieve those this way<br>
<br>
use CGI;<br>
my $cgi = new CGI;<br>
<br>
my @boxes &nbsp;= $cgi-&gt;param(&#39;tagbucket&#39;);<br>
<br>
This gives me a nice array of check box field names, but I don&#39;t know if<br>
they are selected,<br>
<br>
so I try retrieving each box :<br>
<br>
for my $box ( @boxes ) {<br>
 &nbsp; &nbsp;my $box_data = $cgi-&gt;param($box);<br>
 &nbsp; &nbsp;};<br>
<br>
This give me nothing.<br>
<br>
By the way the check box is defined this way :<br>
<br>
 &nbsp;my $cb_name = &nbsp;&quot;bulkdeleteHost-type-$htype-row-$hrowid&quot; ;<br>
 &nbsp;my $be_bad = &nbsp;$cgi-&gt;checkbox( -name =&gt; &quot;tagbucket&quot; &nbsp;, -checked =&gt; 0,<br>
-value =&gt; &quot;$cb_name&quot; &nbsp;, -label =&gt; &quot;Bulk Delete?&quot;) ;<br>
<br>
Any suggestions ?<br>
<br>
<br>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org">SanFrancisco-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/sanfrancisco-pm" target="_blank">http://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
</blockquote></div><br>