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: http://www.nabble.com/-S2--why-is-javascript-executed-before-DOM-is-updated-tp14313561p14313561.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]