[Zope] Setting the "selected" attribute in zpt

Dylan Reinhardt Dylan@DylanReinhardt.com
Mon, 27 Jan 2003 07:19:54 -0800


At 06:45 AM 1/27/2003, Max M wrote:
>The rendered source looks like this:
>
><select name="language" class="selector">
>     <option value="dk">dk</option>
>     <option value="uk" selected="selected">uk</option>
></select>
>
>This  (selected="selected") doesn't work in the browsers.
>
>Can anyone see what I am doing wrong?


That code works for me in Opera and IE6... but it's not 100% correct HTML.

Try:

<option value="uk" selected>uk</option>

Hard to imagine why an extraneous ="foo" would cause incorrect rendering, 
but see if that does the trick.

HTH,

Dylan