Forum Moderators: open
Ok, this is probably something simple, but...
If I create a drop down menu with the following....
<select name="blah">
<option>Boo</option>
</select>
...then specify "blah" as a variable, I get whatever is between the "Option" tags displayed on my page. In this case "Boo".
However, if I do...
<select name="blah">
<option value="foo">Boo</option>
</select>
...then I get "foo" displayed if I specify "blah" on my page.
So, my question is, if I use values for the drop down menus, how do I display whats actually between the <Option> tags?
So, for instance, if I have...
<select name="blah">
<option value="foo">Boo</option>
</select>
...how do I get "Boo" to display instead of "foo"?
Thanks!
:)
<select name="blah"><option>Boo</option></select>
<select name="blah"><option value="foo">Boo</option></select>
<select name="blah"><option value="foo">Boo</option></select>
<select name="select"><option value="foo">Boo</option></select>
I tried your code - and it displayed Boo in the drop down menu. As far as I can see the code should work. What browser are you using (have I read the question wrong?!)?
If its for variables I think you may need to look at the selectedIndex feature - try the following search in Google.com:
"drop down menu" problem selectedindex
Basically, I`m using a php contact form script that displays a list of options, each with an e-mail address as a value. I want to display the names that appear in the e-mail that gets sent out, and not the value.
So, for example if one of the options was "Customer Support", ie...
<select name="send">
<option value="blah@blah.com">Customer Support</option>
</select>
...I want to display "Customer Support" in the e-mail. At the moment, what I see is the value, ie, the e-mail address "blah@blah.com".
Thanks! I`ll try some of the examples and do a search like you said TravelSite!
:)