Ajax technology loads multiple result sets at the same time and assigns them to the same control to solve data conflicts.

Source: Internet
Author: User

Today, multiple result sets are loaded on a personal information page at the same time and assigned to a drop-down list control. data may be disordered from time to time. For example

In a drop-down list, a series of constellations are first loaded, and then the values of a single constellation in the database are asynchronously loaded into the drop-down list. At this time, there are two xmlrequest objects, these two objects are disordered once in order, which may lead to the first initialization and then the value assignment, and sometimes the first assignment and then the initialization, and the data is disordered. You can use this method to solve this problem.

SetTimeout (mothed, 500); The method slows down the value-assigned xmlrequest object by 500 seconds. This will solve the above 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.