|
Posted by Shelly on 11/21/06 19:03
"IchBin" <weconsul@ptd.net> wrote in message
news:OgedneOKI48Y3v7YUSdV9g@ptd.net...
> Kimmo Laine wrote:
>> "Shelly" <sheldonlg.news@asap-consult.com> wrote in message
>> news:YkC8h.1707$ql2.1125@newsread3.news.pas.earthlink.net...
>>> "Kimmo Laine" <spam@outolempi.net> wrote in message
>>> news:Cmy8h.56810$Ef4.19390@reader1.news.jippii.net...
>>>> right:
>>>> <input type="radio" name="foo" checked="checked" />
>>>> <input type="radio" name="foo" />
>>>> <input type="radio" name="foo" />
>>> I do it this way:
>>>
>>> <input type="radio" name="foo" <?php if (some_condition_is_met) echo "
>>> checked"; ?> />
>>>
>>> I don't put in checked="checked", I simply put in checked.
>>
>>
>> That works perfectly if you're using an html 4.01 doctype, there's
>> nothing wrong with that. But as I mentioned, in xhtml an attribute is
>> required to have a value, and that's why one must use checked="checked"
>> when working with xhtml doctype. This is explained briefly in the w3c
>> xhtml documentation: http://www.w3.org/TR/xhtml1/#h-4.5
>>
Thanks Kimmo. I wasn't aware there might be a problem as this has always
worked for me.
Shelly
Navigation:
[Reply to this message]
|