Log in

View Full Version : Needed: A button is grayed out until radio button or checkbox is checked



qwikad.com
03-05-2013, 10:05 PM
Hi,

Just like the title says, I need a javascript code that will keep a "Submit" button grayed out (unclickable) until the person checks out either a checkbox or radio button (it's up to you which one you will choose - radio button or checkbox).

I searched the internet up and down and couldn't find what I need.

Thank you for your help!



__________

Beverleyh
03-05-2013, 10:34 PM
A quick Google search pulled up plenty of options for me.

There's this on DD: http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm

This: http://www.techulator.com/forum/2537-JavaScript-Code-For-I-Accept-T-C-CheckBox-And-Its-Effect-On-Submit-Button.aspx

Or with jQuery: http://jsfiddle.net/PZ6v5/1/

For more scripts like this, try searching something like "accept checkbox before form submit".

If none of these suit your needs, please describe what you're looking for in more detail.

qwikad.com
03-05-2013, 10:52 PM
A quick Google search pulled up plenty of options for me.

There's this on DD: http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm

This: http://www.techulator.com/forum/2537-JavaScript-Code-For-I-Accept-T-C-CheckBox-And-Its-Effect-On-Submit-Button.aspx

Or with jQuery: http://jsfiddle.net/PZ6v5/1/

For more scripts like this, try searching something like "accept checkbox before form submit".

If none of these suit your needs, please describe what you're looking for in more detail.



Thank you so much! I guess I used wrong keywords while searching. I am pretty sure that's what I need.