Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^5: Params in CGI

by eric256 (Parson)
on Nov 20, 2008 at 18:03 UTC ( [id://724939]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Params in CGI
in thread Params in CGI

The check boxs all have the same name so they get returned as an array. The value of the check box would be the cell name. So @cells = $cgi->param("checkbox_name") would then return an array of cell names that are checked.


___________
Eric Hodges

Replies are listed 'Best First'.
Re^6: Params in CGI
by Anonymous Monk on Nov 21, 2008 at 10:49 UTC
    Hi Eric, That was wonderfull. I could get the number of cells that were checked. But It should be exciting, if I could get the lables of the cells that were all checked.
    foreach my $cell (@rows){ split(/,/); print $cgi->td("$cell"); for(my $i= 1;$i<=12;$i++){ print $cgi->td($cgi->checkbox(-name=>'checked', -values=> +["ON"], -default=>'',-label=>"$cell$i")) ; } print $cgi->Tr(); }
    What I say is I like to have the labels, like A1, D1, E1, if they are checked.these are the labels for each cells. THe code you suggested gives 'on'(which is the default) when a checkbox is checked.Any options?
    thanks.

      I suggest you actualy read the answers you get. Instead of using On as a value, use "A1".


      ___________
      Eric Hodges

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://724939]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-18 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found