...

View Full Version : Disabling button in Firefox trick?



rfresh
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;

mrhoo
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum