• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 915
  • Last Modified:

Jquery ui button disable problem

Hi

Im building a pagination with php jquery and ajax.

this is the code im using to disable buttons which has inactive class

$("#toolbar").find(".inactive").button({ disabled: true });

Open in new window


it works fine in firefox but IE shows button as disabled but if i click on disabled button, it still works

any idea why? How to fix this?


Regards.
0
3xtr3m3d
Asked:
3xtr3m3d
  • 2
2 Solutions
 
Lukasz ChmielewskiCommented:
And:
$("#toolbar").find(".inactive").button.attr('disabled',true); 

Open in new window

?
0
 
3xtr3m3dAuthor Commented:
that line makes button disabled. but on IE it appears as disabled but its still works
0
 
BurniePCommented:
Hi,

Take a look at this thread : http://stackoverflow.com/questions/3112541/disable-button-working-on-click

It looks like your button is a submit button, and IE will still submit even if disabled.

So you need to verify in the click event of that button, if it is disabled, then return false.

0
 
Lukasz ChmielewskiCommented:
try this then:
$("#toolbar").find(".inactive").button({ disabled: true }).click(function(e){e.preventDefault();});
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now