Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3912

SCRIPT tags in Ajax-Response are not evaluated in Chrome

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-RC5.1
    • 1.5-RC6
    • wicket
    • None
    • Mac OS X 10.6.6, Chrome 12, Java 6, Tomcat 6

    Description

      if a JavaScript script tag is added to AjaxRequestTarget (by Behavior via JavaScriptUtils.writeJavaScript), it is not evaluated on Chrome browser. While debugging through wicket-ajax.js, it turns out, that replaceOuterHtmlSafari function is not called for Chrome, but the Gecko version gets executed instead (fall to "} else /* GECKO */ {" in Wicket.replaceOuterHtml). And the Gecko version does not do any special handling of SCRIPT tag, since Firefox does execute SCRIPT nodes added dynamically to the DOM.
      This behavior occurs since 1.5-RC5.1.
      There is a quickstart webapp attached to this ticket. HomePage contains a Label with Behavior attached and an AjaxLink. Behavior add a JavaScript showing alert message. It is shown once the page is loaded and once the ajax link is clicked. In Chrome there is not alert message after clicking the ajax link.

      Attachments

        1. quickstart.zip
          22 kB
          Sergiy Barlabanov

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            barlabanov Sergiy Barlabanov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: