Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.17
-
Opera 11.10, Linux Ubuntu 10.10
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.