The menu bar contains the number of to-do items. you can increase or decrease the number based on Task Operations. how do I keep updates from time to time?

Source: Internet
Author: User
The project adopts the ifream three-frame mode. the header is the menu bar, center, and bottom. The current requirement is that the number of to-do tasks is displayed on the menu bar. the number of to-do tasks in different menu bar can be added or subtracted based on the user's corresponding task operations, because the menu bar is open, similar: by...

The project adopts the ifream three framework mode,The header is the menu bar, Center and bottom.
The current requirement is that the number of to-do tasks is displayed on the menu bar. the number of to-do tasks in different menu bar can be added or subtracted based on the user's corresponding task operations, because the menu bar is open, similar:

Therefore (This operation refers to adding, completing, and deleting tasks.) After a task is created, the corresponding position on the menu bar and the number of tasks are updated from time to time. how can this problem be solved?

At present, my practice is to refresh the header information after the operation is complete, but this ensures that the number of tasks in the menu is updated, however, the current style will disappear and become the default style for initial website access. there is no solution. please kindly advise!

Here is my operation to update the header information:

Reply content:

The project adopts the ifream three framework mode,The header is the menu bar, Center and bottom.
The current requirement is that the number of to-do tasks is displayed on the menu bar. the number of to-do tasks in different menu bar can be added or subtracted based on the user's corresponding task operations, because the menu bar is open, similar:

Therefore (This operation refers to adding, completing, and deleting tasks.) After a task is created, the corresponding position on the menu bar and the number of tasks are updated from time to time. how can this problem be solved?

At present, my practice is to refresh the header information after the operation is complete, but this ensures that the number of tasks in the menu is updated, however, the current style will disappear and become the default style for initial website access. there is no solution. please kindly advise!

Here is my operation to update the header information:

Http://www.workerman.net/web-sender

Websocket

Ajax
Websocket

1. use ajax to request data at intervals of time
2. use persistent connection to websocket

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.