CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Unchecking Checkboxes Script (Resolved)

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 02/11/2009, 4:59 AM

I have four checkboxes in a grid. Only one can be checked i.e. rather like a radio button. Does anyone have javascript that will uncheck all others when one is checked?

Any script or idea will be great. Thank you.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 02/11/2009, 6:06 AM

Hi

Maybe the easiest way would be in the client side onchange event for each check box you place custom code that unchecks the other boxes.

eg in the on change event for checkbox1 custom code

document.form_name.checkbox2.checked=false;
document.form_name.checkbox3.checked=false;
document.form_name.checkbox4.checked=false;

Where form_name is the name of thre form the checkbox is on and checkbox1, checkbox2, etc.. are your 4 check boxes.

In the custom code for checkbox2 your would set checkbox1, 3, &4 to false ands so on.

Let me know if that helps

Hope you are having fun..



_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
saseow

Posts: 744
Posted: 02/11/2009, 6:16 AM

jjrjr1, you really are top class! Thank you
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.