View Full Version : Disabling button in Firefox trick?
08-03-2008, 06:10 PM
Is there a trick to being able to disable a button in FF3? The following code works in IE7 but not FF3 or Safari:
document.getElementById("update_button").disabled = true;
08-03-2008, 11:13 PM
document.getElementById("update_button").disabled = 'disabled';
Not all browsers have a default visual style for disabled- you may need to define it yourself.
You can use css to apply a custom style to buttons with the 'disabled' attribute,
or use js to change the style (or className) of a button inline, when you disable it.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.