Solved

disabled = true does on work using Firefox

Posted on 2013-02-04
4
358 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Several part series to implement Internet Explorer 11 Enterprise Mode
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
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…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

792 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