[Rt-commit] r16553 - rt/3.8/trunk/share/html/NoAuth/js
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Mon Oct 27 12:58:15 EDT 2008
Author: sunnavy
Date: Mon Oct 27 12:58:05 2008
New Revision: 16553
Modified:
rt/3.8/trunk/share/html/NoAuth/js/ahah.js
Log:
use post for ahah() except safari
Modified: rt/3.8/trunk/share/html/NoAuth/js/ahah.js
==============================================================================
--- rt/3.8/trunk/share/html/NoAuth/js/ahah.js (original)
+++ rt/3.8/trunk/share/html/NoAuth/js/ahah.js Mon Oct 27 12:58:05 2008
@@ -9,9 +9,23 @@
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
+
+ var use_get;
+ if ( /webkit/i.test( navigator.userAgent ) ) {
+ // seems safari has weird problem with post:
+ // it does remove the old content of target
+ // while doesn't replace that with new content
+ use_get = 1;
+ }
+
if (req != undefined) {
req.onreadystatechange = function() {ahahDone(url, target, delay);};
- req.open("GET", url, true);
+ if ( use_get == 1 ) {
+ req.open("GET", url, true);
+ }
+ else{
+ req.open("POST", url, true);
+ }
req.send("");
}
}
More information about the Rt-commit
mailing list