You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Marshall Allen (JIRA)" <ji...@apache.org> on 2007/05/28 10:24:38 UTC
[jira] Updated: (WW-1951) Ajax submit button executeScripts="true"
evaluates javascript before DOM elements are defined
[ https://issues.apache.org/struts/browse/WW-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marshall Allen updated WW-1951:
-------------------------------
Component/s: (was: API)
Views
Summary: Ajax submit button executeScripts="true" evaluates javascript before DOM elements are defined (was: executeScripts="true" on an ajax submit button evaluates javascript before DOM elements are defined)
> Ajax submit button executeScripts="true" evaluates javascript before DOM elements are defined
> ---------------------------------------------------------------------------------------------
>
> Key: WW-1951
> URL: https://issues.apache.org/struts/browse/WW-1951
> Project: Struts 2
> Issue Type: Bug
> Components: Views
> Affects Versions: 2.0.6
> Reporter: Marshall Allen
>
> If you have an ajax submit button that replaces the div specified by the targets attribute with the result from an action as below;
> <div id="someDiv"></div>
> <ww:submit value="Submit" href="%{someUrl}" theme="ajax" showLoadingText="false" targets="someDiv" executeScripts="true"/>
> and the result returned by the action has some javascript to be executed that uses the document.getElementById() method as below;
> <ww:textfield id="someField" name="someField"/>
> <script type="text/javascript">
> var element = document.getElementById('someField');
> alert(element);
> </script>
> then, the variable "element" will be equal to null. It seems like the javascript is being executed before the <ww:textfield/> is available/defined in the DOM.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.