tags:

views:

75

answers:

1

How can I avoid the dojo parser showing a hidden element after it's parsed?

<input type="checkbox" dojoType="dijit.form.CheckBox" style="display:none">

When the dojo parser is done, the dijit checkbox will be shown, but the input "inside" it, will still be hidden. I want the dojo parser to create the dijit checkbox, but keep it hidden.

+1  A: 

I think that's a limitation of how Dijit works... it's the construction of the widget that's doing this, not the parser per se. The style element gets mapped to the INPUT element, so there is no way to do this short of instantiating the widget directly and hiding it before placing it in the DOM. Updating the style after the parser does its thing would probably result in some unwanted redraws.

peller
Ugly hack, but it seems to be the only way around this... Thanks anyway (:
peirix