Html framework-Multi-dialog box (same id) processing, html framework dialog box id

Source: Internet
Author: User

Html framework-Multi-dialog box (same id) processing, html framework dialog box id

Most of the data on a website is refreshed asynchronously. There is nothing to say about it. Now, many front-end and back-end frameworks know that the frameworks are easy to use and do not have to write styles by yourself, you only need to use the syntax on the framework to make a beautiful dynamic effect, and most of the dynamic effects of the framework are dynamically generated. For example, in the dialog box, if such an example is used, on the home page, a datagrid table is displayed, and double-click Edit to enter the edit dialog box. The data in this dialog box is dynamically generated. This is easy to handle, because there is only one layer of dependency, so there will be no duplicate id bug in the Code standardization point. However, if you select the icon function in the edit dialog box, click the event to generate a dialog box for selecting the icon, the sub-generated code sometimes does not conform to the same logic, because it is clear that you are loading the dialog box under the elements in the edit dialog box, however, the html you see in the browser ran to the body, which is not very depressing. Now, when you dynamically load it, click the edit dialog box next time without refreshing it. It's okay, click the icon in the dialog box and check that only the table is processed. The html under the parent element does not process the elements under the body, but the elements under the body cannot be fully processed. Otherwise, the homepage will be gone, therefore, after processing the elements in the table, we need to process the elements in the second dialog box so that we can remove the overlapping elements each time. There are several ways to deal with them, remove directly.

In the past, I did not solve this problem in depth. Some people may say that the class is directly added to the pop-up, so that the id will not be repeated. In this case, N dialog boxes will pop up at a time, it won't work. The final solution I want to solve later is not to repeat the pop-up and refresh it after it is directly displayed. Don't re-Pop it up, so that no more than one will be generated, just like the dialog box for table editing, because there is only one dialog box, it will not be closed after it is displayed, and it will be processed when it is opened, so this is no problem, however, when I encountered the problem above, it was impossible to display it and stop it. So this solution solved the problem for a while, but it didn't focus on solving the problem. I am very happy today, I wrote a diary.

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.