Ajax dynamic delivery JSP and other pages using ID to identify the transfer object _ajax related

Source: Internet
Author: User
Ajax Dynamic Delivery page, JS Ajax writing, using ID identification to pass objects

For example: Now there is a demand, a page, divided into about two blocks, the left navigation menu has a user list information function button, want to be on the right without a refresh situation to load user data, list display.

We define two JSP main.jsp userlist.jsp

On the right side of the main.jsp is a div id= ' userlist ' layer, which is responsible for accepting the userlist.jsp passed over

UserList processing list data for loops Jstl foreach tags can be

MAIN.JSP Click on the User list button to trigger the following JS

Doajax ("userlist", access request, to the background processing, background query db to get the data, passed to the userlist.jsp page);

This allows users to see the current user data loaded without refreshing, avoiding the usual JSON processing or ifram loading
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.