Jquery ui button disable problem

Posted on 2011-03-04
Last Modified: 2012-05-11

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?

Question by:3xtr3m3d
  • 2
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35039288

Open in new window


Author Comment

ID: 35041522
that line makes button disabled. but on IE it appears as disabled but its still works
LVL 16

Accepted Solution

BurnieP earned 250 total points
ID: 35043787

Take a look at this thread :

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.

LVL 27

Assisted Solution

by:Lukasz Chmielewski
Lukasz Chmielewski earned 250 total points
ID: 35045505
try this then:
$("#toolbar").find(".inactive").button({ disabled: true }).click(function(e){e.preventDefault();});

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now