homepage Welcome to WebmasterWorld Guest from 54.211.180.175
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Unchecking a Radio Button in a Function
Changing a radio button's status from checked to unchecked in a function.
LBillingsley




msg:3794206
 9:58 pm on Nov 25, 2008 (gmt 0)

Hello,

Thanks for looking into this.

I have JavaScript code that displays or hides a table row when you click a radio button. It works fine. Click the radio button and a row is displayed. Then, click that now-selected radio button and the row is hidden. If you click a different radio, while the first one is still open, the row opened by the first button will hide. But, if you click a radio button to display the row, then click it again to hide it, you can not click the same radio button again to display it again; you have to click a different one. I want to be able to keep clicking the same radio button to display and hide over and over if necessary.

It seems to me that the answer would be to somehow un-check the radio button after hiding it. Please let me know if that is possible, or suggest another solution.

Much Thanks,
Lewis

 

garann




msg:3794219
 10:34 pm on Nov 25, 2008 (gmt 0)

Not sure I understand what you want to do, but does [radioButton].checked not work?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved