?
Solved

disabled = true does on work using Firefox

Posted on 2013-02-04
4
Medium Priority
?
379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 41

Accepted Solution

by:
Kyle Abrahams earned 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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 Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

650 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