JQuery Ajax Bug:object doesn ' t support this property or Method_jquery

Source: Internet
Author: User
Tags ticket
Problem: A bug in the jquery control
Use $.ajax error, IE7 will be wrong, ie6,ie8 are normal. Error prompts the following figure:

Notes from the official forum:

Http://forum.jquery.com/topic/object-doesn-t-support-this-property-or-method-from-jquery-1-4-1-in-ie7-only
http://dev.jquery.com/ticket/6498
http://dev.jquery.com/ticket/6314

Solution:
Modify Jquery-1.4.2.js.

Some of the changes I have made in the forum have been tested and feasible.

Copy Code code as follows:

Hi, I found this seems to relate to JQuery bug 6314 (http://dev.jquery.com/ticket/6314). In IE7, if ' Enable native XMLHTTP support ' is checked (under Tools > Internet Options > Advanced tab > inside the Security section) then this error shows up. Unchecking/disabiling the option seems to resolve the error.

However, since I cannot tell all website viewers to uncheck this option, then the following code also seems to resolve the Issue
In Non-minified jQuery, find the lines:
try {
var oldabort = Xhr.abort;
Xhr.abort = function () {
if (XHR) {
Oldabort.call (XHR);
}

onReadyStateChange ("Abort");
};
catch (e) {}

Replace it with the following code:
try {
var oldabort = Xhr.abort;
Xhr.abort = function () {
if (XHR) {
if (Oldabort.call = = undefined) {
Oldabort ();
} else {
Oldabort.call (XHR);
}
}

onReadyStateChange ("Abort");
};
catch (e) {}

I believe the issue is as stated by the The XHR (XMLHTTP) object are a native IE object, so the Abort function on the Xhr.abort function does not support call.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.