tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taha Hafeez <tawus.tapes...@gmail.com>
Subject Re: T5.2: Javascript document.getElementById() after zone update
Date Sun, 06 Mar 2011 04:50:07 GMT

When you click 'View Source Code' in a browser, it shows you the html loaded
first time the page was loaded and does not show the dom changes done using
ajax. If you want to see the latest dom,  install firebug on firefox(chrome
has a very similar one by default) and enable it by clicking on the bug icon
on the status bar.

Also, how are using getting the element id of select in your javascript ?


On Sun, Mar 6, 2011 at 10:02 AM, Josh Canfield <joshcanfield@gmail.com>wrote:

> If it's in the zone then the id is probably changing. How are you
> determining that its staying the same?
> Try using a class instead of id?
> On Mar 5, 2011 6:45 PM, "Sérgio Esteves" <sergio.esteves@xpand-it.com>
> wrote:
> > Hi all,
> >
> > At the end of a zone block, I call a JS function which tries to get an
> element (that is also inside the zone) by calling
> document.getElementById('componentSelectId'). The first time the page loads
> and the zone is rendered everything works as it should. Although, when I
> update the zone, by changing the value of a select component, the JS gets
> executed, but "document.getElementById('componentSelectId')" returns null.
> Looking at the page source on the web browser I can see that the element is
> there with the very same id. Anybody can tell what is going on here?
> >
> > Thanks.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message