Posted by Kimmo Laine on 11/21/06 12:50
"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
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)
[Back to original message]
|