You are here: Re: Programmatically setting a radio buttones « PHP Programming Language « IT news, forums, messages
Re: Programmatically setting a radio buttones

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)

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация