Solved

disabled = true does on work using Firefox

Posted on 2013-02-04
4
350 Views
Last Modified: 2013-02-06
In Javascript using Internet Explorer, I'm disabling a button, like this:

var btn = document.getElementById("ctl00_PageContent_btnNext__Button");
btn.disabled = true;

However this does not work using Firefox.  Now, I have read numerous articles on various sites on this issue, and none of the solutions have worked.  I'm looking for a solution that works.   Please do not just point me to another article or site.  I'm looking for a definitive answer - one that works.
0
Comment
Question by:HLRosenberger
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 38852782
http://stackoverflow.com/questions/10765149/disabled-works-in-ie-but-not-in-firefox

The link explains that IE grays out the button while firefox does not, however it is disbaled.
Have you tried clicking on the button in firefox?

The solution proposed in that site is to use a different image to imitate the grayed out button.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 38852797
Yes, I already saw this article.  I wish it was truely disabled, but just not grayed out.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38853305
if you are using an xhtml doctype then the correct reference is:

btn.disabled = 'disabled';

Cd&
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 38860025
Yes, this worked.  I used a new CSS class to gray out the button.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

776 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