Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Something is wrong and I don'tkow what

by wardk (Deacon)
on Oct 18, 2000 at 20:42 UTC ( [id://37351]=note: print w/replies, xml ) Need Help??


in reply to Something is wrong and I don'tkow what

Monk2b,

The following snippet may not produce what you expect. Although it's no a perl issue, but an HTML form issue.

print "<OPTION VALUE=\"people\">Dennis </OPTION>"; print "<OPTION SELECTED VALUE=\"people\">alex</OPTION>"; print "<OPTION VALUE=\"people\">andrew </OPTION>"; print "<OPTION VALUE=\"people\">Irving</OPTION>"; print "<OPTION VALUE=\"people\">Freddy</OPTION>"; print "<OPTION VALUE=\"people\">Ken</OPTION>"; print "<OPTION VALUE=\"people\">Mike</OPTION>"; print "<OPTION VALUE=\"people\">Tim</OPTION>"; print "<OPTION VALUE=\"people\">Bob</OPTION>"; print "<OPTION VALUE=\"people\">Ashley</OPTION>"; print "<OPTION VALUE=\"people\">Richard</OPTION>"; print "<OPTION VALUE=\"people\">Terrance</OPTION>"; print "<OPTION VALUE=\"people\">Ronald</OPTION>"; print "<OPTION VALUE=\"people\">Phil</OPTION>";

I think that you are most likely desiring that the value from the popup return a value equal to the name of the string in the popup.

Something more like this:

print "<OPTION SELECTED VALUE=\"alex\">alex</OPTION>"; print "<OPTION VALUE=\"andrew\">andrew </OPTION>";

Or in keeping with the above advise about escaping...

print q!<OPTION SELECTED VALUE="alex">alex</OPTION>!;

Otherwise all you'd ever get sent to the target (action=) CGI was "people", not the actual name.

Good luck!

Log In?
Username:
Password:

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

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

    No recent polls found