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