[Javascript] disabled menus

Paul Novitski paul at novitskisoftware.com
Tue Mar 1 14:48:50 CST 2005


At 11:59 PM 2/28/2005, Chuck Soper wrote:
>I added the following line to the popuplateBreadSelect function:
>   element.setAttribute("disabled", "disabled");
>but, it doesn't work.

Chuck,

Sorry, when I tested the disabled attribute before I posted my response I 
didn't take the time to check it cross-browser.  Internet Explorer doesn't 
support it:

         "The disabled attribute can be set and retrieved. However, the 
functionality specified by the HTML 4.0 Non-Microsoft link standard is not 
implemented for this property.
         "There is no functionality implemented for this property unless 
defined by the author."
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/disabled_3.asp

I built my own select list out of spare parts that does support 'disabled':
http://www.novitskisoftware.com/demos/DisabledListOptions/DisabledListOptions.html

However, in retrospect, I can see that a simpler solution would have been 
simply to use JavaScript to force IE to obey the disabled attribute.  Let 
me know if you'd like to pursue that path.

Paul 





More information about the Javascript mailing list