Solved

Jquery ui button disable problem

Posted on 2011-03-04
4
828 Views
Last Modified: 2012-05-11
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
Comment
Question by:3xtr3m3d
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
Comment Utility
And:
$("#toolbar").find(".inactive").button.attr('disabled',true); 

Open in new window

?
0
 
LVL 3

Author Comment

by:3xtr3m3d
Comment Utility
that line makes button disabled. but on IE it appears as disabled but its still works
0
 
LVL 16

Accepted Solution

by:
BurnieP earned 250 total points
Comment Utility
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
 
LVL 27

Assisted Solution

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
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…

763 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

6 Experts available now in Live!

Get 1:1 Help Now