Click to See Complete Forum and Search --> : difference between id and name for radiobuttons


damon2003
05-04-2005, 11:31 AM
Hi,

you can add ids and name to radiobuttons but whats the difference between the two? If you give a radiobutton different id and name, how do you refer to it. Is there actual any point in giving it both an id and name or can you do everything you need to with just one of them?

thanks,

Damon

memark
05-04-2005, 11:37 AM
id is the "modern" way of naming html elements (including radio buttons). As far as I know there is no reason to continue using deprecated name attributes?

Fang
05-04-2005, 01:49 PM
name is not depreciated (http://www.w3.org/TR/REC-html40/index/attributes.html)
To toggle a set of radio buttons you must use name