• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 895
  • 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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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