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

Re: Selecting a value on a pull-down menu

by wardk (Deacon)
on Oct 02, 2000 at 22:15 UTC ( [id://34948]=note: print w/replies, xml ) Need Help??


in reply to Selecting a value on a pull-down menu

Not real elegent, but should select the proper drop-down choice
my @choices = ("Make a selection", "Yes", "No" ); my $UsersChoice = GetUsersChoiceFromDB($user); my $selected = ""; print "<select name=whatever>"; foreach $choice ( @choices ) { if ( $choice eq $UsersChoice ){ $selected = "SELECTED" } else ( $selected = ""; } print "<option $selected value=$choice>$choice"; } print "</select>";

Log In?
Username:
Password:

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

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

    No recent polls found