Struts 2
  1. Struts 2
  2. WW-3015

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 2.1.6
    • Fix Version/s: None
    • Component/s: Plugin - Dojo Tags
    • Labels:
      None
    • Environment:

      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

        Activity

        Ryan Grice created issue -
        Ryan Grice made changes -
        Field Original Value New Value
        Summary dojo will not run javascript in remote content in sx:div if remote content includes sx:submit dojo will not run javascript in ajax result if the result includes includes sx:submit
        Ryan Grice made changes -
        Priority Major [ 3 ] Trivial [ 5 ]
        musachy made changes -
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Jeff Turner made changes -
        Project Import Mon Feb 01 01:17:42 UTC 2010 [ 1264987062082 ]
        Lukasz Lenart made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Ryan Grice
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development