[Javascript] How to disable by id in Mozilla -- working in in most browsers NOT opera

Hassan Schroeder hassan at webtuitive.com
Fri Sep 26 09:51:54 CDT 2003


Guy Platt wrote:

> Sorry I didn't post the HTML as well so you could see that the ID I was 
> working with was for a fieldset. While the code you posted works 
> perfectly for input fields it has no effect on fieldsets in Mozilla. ( 
> In IE the disable grays out the fieldset in the same way it grays the 
> input fields).

Which, as with so many things IE, is invalid HTML; the FIELDSET tag
has no 'disabled' attribute --

   <http://www.w3.org/TR/html4/interact/forms.html#adef-disabled>

So this would never work in a conforming browser, anyway. Hiding a
fieldset with display is the better (and appropriate) solution.

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.






More information about the Javascript mailing list