in reply to Creating Multi-word Options
In cases like this, it's always a good idea to look at the HTML you are producing. In this case you'll get something like:
<option value=Desktop Products>Desktop Products</option>
And any browser will interpret that as:
<option value="Desktop" Products>Desktop Products</option>
So what you really want is:
<option value="Desktop Products">Desktop Products</option>
You can only omit quotes around HTML attribute values when they only contain alphanumeric characters. Your attribute contains a space, so it must be quoted. In fact it's a good habit to get into to always quote all HTML attribute values.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|