Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

checkbox problem

by bory (Beadle)
on Aug 21, 2003 at 09:36 UTC ( [id://285407]=perlquestion: print w/replies, xml ) Need Help??

bory has asked for the wisdom of the Perl Monks concerning the following question:

I have perl script, in this one I have a command with which I'm getting some information from a server! The information I receive I put it in a table with multiple colomns and rows. On each row in the first cell I put a checkbox, so that the selected one is sent to another script via form. The problem is that I want to sent the entire row with every cel from it when I select it, but i don't know how to do this! I mention that every %s is corespondet for identifier, phase, server etc. and returns the specific information for each! Ican't use %a,%b, %c, %d! Here is the code:
<pre> findbug -p Dxy -T | sort -u | bugval -s \"<tr><td> <input type="check +box" name="Identifier" value="1">%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</t +d><td>%s </td><td>%s</td><td>%s</td></tr>\n\" identifier phase server state production release projects deadlines " >> tablou_DDTS_fr.html; </pre>
Thank you very much for your help and time!

Replies are listed 'Best First'.
Re: checkbox problem
by benn (Vicar) on Aug 21, 2003 at 10:17 UTC
    Are you just looking for hidden fields? Something like...
    <td> <input type="checkbox" name="Identifier" value="1">%s <input type='hidden' name='phase' value='%s'> <input type='hidden' name='server' value='%s'> <input type='hidden' name='state' value='%s'> # etc. </td> <td>%s</td><td>%s</td><td>%s</td> ... identifier phase server state phase server state
    Cheers, Ben.
      But in this way the filds doesn`t appear in the first table!I want them to appear in the first table, to select them and send them to the second table! Thank you very much
        In my example, I showed the fieldnames at the end printed twice, so as to include them twice in the replacement string (once as a hidden value, once in the table cell). I guess this is some form of printf, so that should be valid.

        If not, and you're tied down to the implementation of this using the interface described (as opposed to writing a script that reads the results of your 'findbug' progam into a bunch of variables), then you'll need to find some other way of passing / displaying the fields at the same time - maybe as a (non-editable?) text-box or something.

        Cheers, Ben.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found