Author: knopp
Date: Sat Dec  8 07:47:18 2007
New Revision: 602487

URL: http://svn.apache.org/viewvc?rev=602487&view=rev
Log:
WICKET-1186

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=602487&r1=602486&r2=602487&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
(original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js 
Sat Dec  8 07:47:18 2007
@@ -187,14 +187,15 @@
        var tn = element.tagName;
                                
                                        
-       var container = Wicket.$("wicket-temp-container");                      
                
        var tempDiv = document.createElement("div");
        var tempParent;
        
        // array for javascripts that were in the text
        var scripts = new Array();                              
        
-       container.appendChild(tempDiv);
+       if (window.parent == window || window.parent == null) {
+               document.body.appendChild(tempDiv);
+       }
                
        if (tn != 'TBODY' && tn != 'TR' && tn != "TD" && tn != "THEAD") {
                
@@ -253,8 +254,7 @@
        element.outerHTML = ""; 
        element = "";
                
-       container.removeChild(tempDiv);
-       container.innerHTML = "";
+       document.body.removeChild(tempDiv);
        tempDiv.outerHTML = "";
 
        parent = null;
@@ -1984,13 +1984,4 @@
        if (e!=null) {
            e.style.display = "none";
        }
-}
-
-Wicket.Event.addDomReadyEvent(function() {
-       if (Wicket.Browser.isIE()) {
-               var div = document.createElement("div");
-               div.setAttribute("id", "wicket-temp-container");
-               div.setAttribute("style", "display:none");
-               document.body.appendChild(div);
-       }
-});
\ No newline at end of file
+}
\ No newline at end of file


Reply via email to