struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lbastil <>
Subject Re: [S2] why is javascript executed before DOM is updated
Date Thu, 13 Dec 2007 11:42:22 GMT

Is this the WW-1951 - issue?

And if so, is there any workaround for 2.0.11 release?

Thank you,

lbastil wrote:
> I have a serious problem with an ajax submit.
> the scenario is the following:
> I submit a form with ajax submit button and I want to update the parent
> div (targets="...")
> The original content of this div and the result content contains a
> <script> section with
> javascript at the very end.
> Now the following happens: after pressing the submit button the ajax call
> is done correctly.
> But after that at first the script is executed, then the DOM is updated by
> replacing originally div 
> content with the result from ajax call.
> But this is not what I would expect. The javascript for instance changes
> some things (like
> enabling / disabling form elements), which are then overwritten by the DOM
> updating.
> The interesting thing is: originally the content of the div is also loaded
> / filled by ajax mechanisms,
> but not triggered from <s:submit>. In this first case the javascript is
> executed on the exact
> order, where it is placed in the code. Why not when doing it via
> <s:submit>?
> Can anybody explain me what is going on here and suggest a workaround?
> Thank you very much in advance,
> basti

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message