Ajax aborted error request interrupt resolution in IE6 _ajax related

Source: Internet
Author: User
A click event is used to trigger an AJAX request for a label, and in IE6, requests are often interrupted and all are normal in other browsers.

In IE6 use FIDDLER2 and HttpWatch monitoring requests, often appear "aborted", toss for a long time, quite strange. Later, the a label was replaced with a button, the request was normal, and the last reminder may be that the default event for a label interrupted the request. However, in the HTML code, the href of the A label has been set to "javascript:void (0)", which is usually used to block the default event (page jump). The Click event of a label executes before the href jump is executed, and if HREF is a JavaScript statement, it executes at this time. IE6 interrupts the AJAX request triggered by the click when it executes the JavaScript statement for href. Using href= "javascript:void (0)" To prevent the default event, moving the action that prevents the default event to the Click event resolves the problem so that the JavaScript statement in HREF is not executed.

Note: A plus onclick= ' return false; ' can also solve the problem.
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.