Html Option Tag

liunx

Guest
Hey all! Is there a way to pass more than one value using the HTML option tag? I am using HTML and ASP together and so I need a first name variable and a last name variable from a DB2 table to be passed as well as show up together as one value in the drop-down box I have created (i.e. John Doe). As of right now I have figured out how to make it show in the drop-down box as John
Doe
however, I need the full name to be one value. Hope this makes sense! Thanks!

Response.write "<option value=" & rs("FIRST_NM") & ">" & rs("FIRST_NM") & "</option> <option value=" & rs("LAST_NM") & ">" & rs("LAST_NM") & "</option>"

:eek:why not combined them in one option tag with a seperator of some sort.Yeah just use some sort of delimiter to seperate the values, i had to do something similar and just used "||" to seperate the seperate values, then just explode the value of the option when you need to access the seperate values.
 
Back
Top