After upgrading jquery from 1.4.2 to 1.4.4, I get this error "Illegal operation on a ProtopNative Prototype object" when trying to use $ .ajax ()
Here is the simplified code:
function doAjax(url, data, complete) {
if (data == null) {
var data = {};
}
if (complete == null) {
var complete = function(){};
}
if (url == '') {
url = window.location;
}
data.ajax = 1;
$.ajax({
type: 'POST',
url: url,
cache: false,
data: data,
dataType: 'script',
success: function(data, textStatus){
},
error: function(xhr, textStatus, errorThrown) {
doAlert('An error occurred: '+xhr.responseText);
},
complete: complete
});
}
doAjax('', {});
Can anyone understand what the problem is?
source
share