Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Ajax submit button executeScripts="true" evaluates javascript
before DOM elements are defined

Oleg Mikheev

2007-08-07

Replies:

rrecoba wrote:
> i have an ajax submit button that replaces the div specified by the targets
> attribute with the result from an action, and the result returned by the
> action has some javascript to be executed that uses the
> document.getElementById().
>
> I??ve read that this is a known issue (WW-1951) that will be fixed in v2.1.0.
> How can i solve this problem while v2.1.0 is released.??
>
> Thanks.

Define a function with your JS and execute it once page is loaded.
Try putting smth like
_container_.addOnLoad(function() {alert('hi');});
inside the result.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.