Author: jcompagner
Date: Fri Feb 15 03:20:39 2008
New Revision: 628015

URL: http://svn.apache.org/viewvc?rev=628015&view=rev
Log:
fix for FF that sometimes when using iframes mixes up the base url (it does a 
ajax get to the url thats in the location bar of the browser instead what is in 
the iframe)

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=628015&r1=628014&r2=628015&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 
Fri Feb 15 03:20:39 2008
@@ -758,7 +758,6 @@
        },
        
        createUrl: function() {
-       
                if (this.randomURL == false)
                        return this.url;
                else
@@ -822,6 +821,14 @@
                        
                        var t = this.transport;
                        if (t != null) {
+                               if (Wicket.Browser.isGecko()) {
+                                       var href = document.location.href;
+                                       var lastIndexOf = href.lastIndexOf('/');
+                                       if (lastIndexOf > 0)
+                                       {
+                                               url = 
href.substring(0,lastIndexOf+1) + url;
+                                       }
+                               } 
                                t.open("GET", url, this.async);
                                t.onreadystatechange = 
this.stateChangeCallback.bind(this);
                                // set a special flag to allow server 
distinguish between ajax and non-ajax requests


Reply via email to