[Dojo-interest] Problem with dojo.widget.byId and FF

Karl Tiedt ktiedt at gmail.com
Sun Dec 10 17:40:25 MST 2006


Where is your alert being called in the JS? maybe IE is parsing the widget
before your code is called and FF isnt, but if you use a dojo.addOnLoad() it
might work in both cases....

On 12/10/06, hysterio <hysterio at telenet.be> wrote:
>
> Hi all,
>
> I've lost it completely. I have following code in a html-page
> <div dojoType="AccordionContainer" id="gs_ouder" labelNodeClass="tpLabel"
> containerNodeClass="acContainer">
>          <div dojoType="ContentPane" class="overflow_auto" id="gs_top20"
> label="1" selected="true"></div>
>   <div dojoType="ContentPane" class="overflow_auto" id="gs_song"
> label="2"></div>
> </div>
>
> I have a script containing this line:
> alert(dojo.widget.byId("gs_top20"));
>
> IE 6.0
> --> got an alert with the widget's information
>
> FF (-- Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1)
> Gecko/20061010
> Firefox/2.0 --)
> --> got an alert telling me "undefined"
> if i use dojo.byId instead --> got an alert telling me it's HTMLDivElement
> if i use document.getElementById --> got an alert telling me it's
> HTMLDivElement
> i also tried dojo.widget.manager.byId("gs_top20"), but that's also
> resulting
> in an alert with "undefined"
>
> So am i missing something? Doing something wrong? Is this a known issue?
>
> Hopefully someone could help me with this problem, because i'm not far
> away
> of going bananas on this one :-)
>
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>



-- 
-Karl Tiedt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20061210/d7b43ba6/attachment.html


More information about the Dojo-interest mailing list