Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: How to keep the state of a drop down select box in perl

by Adam (Vicar)
on Dec 16, 2000 at 00:56 UTC ( [id://46923]=note: print w/replies, xml ) Need Help??


in reply to Re: How to keep the state of a drop down select box in perl
in thread How to keep the state of a drop down select box in perl

for things like:
<select name="dropdown"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select>
I usually use map:
my @options = ( 'Option 1', 'Option 2', 'Option 3', ); @options = map { "<option>$_</option>" } @options; print '<select name="dropdown">', @options, "</select>\n";

Replies are listed 'Best First'.
(bbq) Re: Re: Re: How to keep the state of a drop down select box in perl
by BBQ (Curate) on Dec 16, 2000 at 13:18 UTC
    Yes, but... that doesn't actually output a selected option! :) The question was on how to keep the state of a dropdown box. I guess mine doesn't work either since I am only counting on a single select dropdown, and just looking over it occured to me that it would break under a multiple select.

    eeeek!

    #!/home/bbq/bin/perl
    # Trust no1!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2024-04-24 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found