You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ryan Grice (JIRA)" <ji...@apache.org> on 2009/02/27 00:30:45 UTC

[jira] Updated: (WW-3015) dojo will not run javascript in ajax result if the result includes includes sx:submit

     [ https://issues.apache.org/struts/browse/WW-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Grice updated WW-3015:
---------------------------

    Summary: dojo will not run javascript in ajax result if the result includes includes sx:submit  (was: dojo will not run javascript in remote content  in sx:div if remote content includes sx:submit)

update:  looks like it doesnt even matter if the content is loaded from an sx:div.   This breaks too, unless you remove the sx:submit from test-ajaxresult.jsp:


-----------------test-ajax.jsp------------------------
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>

<html>
<head>
    <s:head />
    <sx:head parseContent="true" debug="true"/>
</head>

<body>
<div id="testDiv">
    <sx:submit href="/test-ajaxresult.action" targets="testDiv" executeScripts="true"/>
</div>
</body>
</html>
-----------------------------------------------------



> dojo will not run javascript in ajax result if the result includes includes sx:submit
> -------------------------------------------------------------------------------------
>
>                 Key: WW-3015
>                 URL: https://issues.apache.org/struts/browse/WW-3015
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Dojo Tags
>    Affects Versions: 2.1.6
>         Environment: Fedora Core 10, 2.6.27.12-170.2.5.fc10.i686
> apache-tomcat-6.0.18
>            Reporter: Ryan Grice
>
> -------------test-ajax.jsp---------------------------------------
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <html>
> <head>
>     <s:head />
>     <sx:head parseContent="true" debug="true"/>
> </head>
> <body>
> <s:url action="test-ajaxresult" id="testAjaxURL"/>
> <sx:div id="testDiv" href="%{testAjaxURL}" executeScripts="true"/>
> </body>
> </html>
> --------------------------------------------------------------------
> -----------------test-ajaxresult.jsp---------------------------------
> <%@ taglib prefix="s" uri="/struts-tags" %>
> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
> <script type="text/javascript">
> alert("foo");
> </script>
> <p>Here is some text</p>
> <p>This sx:submit button will cause dojo not to run the javascript above.  Remove it or change it to a plain s:submit and the script executes:</p>
> <p><sx:submit href="/someurl" targets="testDiv"/></p>
> -------------------------------------------------------------------------
> The error I get from dojo in debug mode is just "DEBUG: Error running scripts from content: undefined"
> This bug seems to make it impossible to populate a div with a form that includes javascript

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.