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

<script> element in Ajax requests is executed twice in Opera 11

    XMLWordPrintableJSON

Details

    Description

      I have component with behavior which adds <script> element in Behavior.onComponentRendered() to respons. This javascript is to be processed in browser when component is rendered. This works pretty well when component is rendered during standard HTTP request. But when the same code is called from Ajax request, this script runs on browser two times!

      There is some magic in Ajax request processing in wicket-ajax.js: only for Opera and IE these <script> elements from responses are added to HTML and page <header> element as well. Comment says that this is workaround for these browsers, maybe in older versions of Opera dynamically adding element into HTML doesn't run <script> elements within, but now could be obsolete.

      Attachments

        1. testcase-WICKET-3669.tar.gz
          8 kB
          Martin Schayna
        2. testcase-WICKET-3669-second.tar.gz
          8 kB
          Martin Schayna

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mschayna Martin Schayna
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: