Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3015

dojo will not run javascript in ajax result if the result includes includes sx:submit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Won't Fix
    • 2.1.6
    • None
    • Plugin - Dojo Tags
    • None
    • Fedora Core 10, 2.6.27.12-170.2.5.fc10.i686
      apache-tomcat-6.0.18

    Description

      ------------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

      Attachments

        Activity

          People

            Unassigned Unassigned
            rgrice Ryan Grice
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: