frequently ask ? : Computers : Programming : Languages : JavaScript : Event handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 11 people (0%) answered Yes
Recently 0 of 10 people (0%) answered Yes

Entry

How can I know which item I just selected in a multiple-choice selection list?

Mar 2nd, 2002 14:55
William, Frank Huang,


## In ASP ##
Supposing you're on colorTest1.asp and this is your form and list:
   <form action="colorTest2.asp" method="post">
   <select name="color" size="1">
     <option name="color" value="red">Red
     <option name="color" value="blue">Blue
     <option name="color" value="green">Green
   </select>
   <input type="submit" value="Go!">
   </form>
   ... 
Then colorTest2.asp would read, simply:
Your Favorite Color Is: <b><%= Request.Form("color") %></b>
  ...
Does this solve your problem? I hope so!