Posted by Jonathan N. Little on 07/03/06 16:23
Kimmo Laine wrote:
> "Syl" <david.hunter@gmail.com> wrote in message
> news:1151631503.326607.307760@y41g2000cwy.googlegroups.com...
>> kandi111777 wrote:
>>> I have a form that includes a drop down box. I can get all of the other
>>> values to show up in an e-mail except for the drop down box values. Can
>>> someone please help? -- I know the HTML isn't the greatest. The website
>>> was originally created in FrontPage and the form broke. I'm just trying
>>> to help out and fix it for a friend.
>>>
>>> sendmail.php
>>> $Subject = $_REQUEST['subject'];
>>> <td width="88" align="right"><select name="Subject" size="1">
>>> <option selected>Web Site</option>
>>> <option>Company</option>
>>> <option>Products</option>
>>> <option>Store</option>
>>> <option>Employee</option>
>>> <option>(Other)</option>
>>> </select> </td>
>>
>> You're missing a value in the option of the drop down
>>
>> Change all the options like this --> <option>Company</option>
>> to this --> <option value="company">Company</option>
>> to this --> <option value="employee">Employee</option>
>>
>
>
> That's not an issue, if value is not given, then anything that's inside the
> <option></option> will be used instead. In this case for example
> <option>Company</option> Company will be used since it lacks value.
>
Browser dependent, MS IE doesn't set the value by default. It really
becomes noticeable in JavaScript if you test for someSelectElement.value
will fail in IE if you do not explicitly set the value attributes on the
OPTION elements...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
[Back to original message]
|