Solved

disabled = true does on work using Firefox

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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

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…
This article discusses how to implement server side field validation and display customized error messages to the client.
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.
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 +…

696 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