Fixed two bugs with jQuery: One with height computation, one with .find(expr,fn)...
[jquery.git] / src / ajax / ajax.js
index e9580aa..7bd392a 100644 (file)
@@ -58,7 +58,7 @@ jQuery.fn.load = function( url, params, callback, ifModified ) {
 };
 
 // If IE is used, create a wrapper for the XMLHttpRequest object
-if ( jQuery.browser.msie )
+if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" )
        XMLHttpRequest = function(){
                return new ActiveXObject(
                        navigator.userAgent.indexOf("MSIE 5") >= 0 ?
@@ -274,6 +274,9 @@ jQuery.extend({
                // If the type is "script", eval it
                if ( type == "script" ) eval.call( window, data );
 
+               // Get the JavaScript object, if JSON is used.
+               if ( type == "json" ) eval( "data = " + data );
+
                return data;
        },