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:20:38 UTC
[jira] Created: (WW-1951) executeScripts="true" on an ajax submit
button evaluates javascript before DOM elements are defined
executeScripts="true" on an ajax submit button 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: API
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.
[jira] Updated: (WW-1951) Ajax submit button executeScripts="true"
evaluates javascript before DOM elements are defined
Posted by "Marshall Allen (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (WW-1951) Ajax submit button executeScripts="true"
evaluates javascript before DOM elements are defined
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso reassigned WW-1951:
-----------------------------------
Assignee: Musachy Barroso
> 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
> Assignee: Musachy Barroso
>
> 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.
[jira] Updated: (WW-1951) Ajax submit button executeScripts="true"
evaluates javascript before DOM elements are defined
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso updated WW-1951:
--------------------------------
Fix Version/s: 2.1.0
> 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
> Assignee: Musachy Barroso
> Fix For: 2.1.0
>
>
> 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.
[jira] Resolved: (WW-1951) Ajax submit button executeScripts="true"
evaluates javascript before DOM elements are defined
Posted by "Musachy Barroso (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Musachy Barroso resolved WW-1951.
---------------------------------
Resolution: Fixed
> 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
> Assignee: Musachy Barroso
> Fix For: 2.1.0
>
>
> 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.