Solved

disabled = true does on work using Firefox

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

Accepted Solution

by:
Kyle Abrahams earned 500 total points
Comment Utility
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
Comment Utility
Yes, I already saw this article.  I wish it was truely disabled, but just not grayed out.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
if you are using an xhtml doctype then the correct reference is:

btn.disabled = 'disabled';

Cd&
0
 
LVL 1

Author Closing Comment

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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
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.

771 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

10 Experts available now in Live!

Get 1:1 Help Now