I know that by default, HTML radio buttons cannot be unselected (no button selected) once a selection has been made. I'm wondering if anyone has added a javascript snippet to clear the selection and would be willing to share it?
Announcement
Collapse
No announcement yet.
Unselecting Radio Buttons
Collapse
X
-
Unselecting Radio Buttons
Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Tags: None
-
As it happens, I have a project on my desk now that needed that:
Code:var buttons = document.getElementsByName('YOUR_ELEMENT_NAME_HERE'); for (var b = 0; b < buttons.length; b++) { buttons[b].checked = false; }Kent Multer
Magic Metal Productions
http://TheMagicM.com
* Web developer/designer
* E-commerce and Miva
* Author, The Official Miva Web Scripting Book -- available on-line:
http://www.amazon.com/exec/obidos/IS...icmetalproducA
Comment