Friday, April 09, 2010

Jquery, disable input button

Very usefull to disable/enable input button by using jquery



(function($) {
//disable download attachment when on change search criteria
$('.report-form-container :input').change(function() {
$(':input[name^=report_redirect:]').attr('disabled', true);
});
//enable download attachment when search button click.
$(':input[name^=search:]').click(function() {
$(':input[name^=report_redirect:]').attr('disabled', false);
});

No comments: