September 1st 2008

Disable Submit Button Until Terms And Conditions Are Accepted Using jQuery

Often times when signing up for a new service or such you must accept the site’s terms and conditions. Until you explicitly check that you agree, you are not allowed to submit the web page. Here is an easy way to do this using jQuery. You just have to change some attributes on your button to enable/disable. For more info see the jQuery documentation. Note that the user will still be able to submit the page if JavaScript is disabled.

Live Demo | Download (HTML, CSS, JavaScript)

Disabled:

Disabled Image

Enabled:

Disabled Image

JavaScript Disabled:

Disabled Image

jQuery:

ASP.NET:

Hope this helps someone :)