HTML frames-Multiple dialog boxes (same ID) processing

Source: Internet
Author: User

Most of the data of a Web site is asynchronous refresh, there is nothing to say, and now a lot of back and forth framework, we all know that the framework is very useful, do not write their own style, as long as the use of the framework of the syntax can make a beautiful dynamic effect, and with the framework of the most dynamic effects are generated dynamically, For example, with a dialog box, if one such example, the home page is a DataGrid table display, and then double-click Edit to enter the Edit dialog box, and the data in this dialog box is generated dynamically, this is good to deal with, because there is only one layer of dependency, So the code specification point will not have a duplicate ID bug, but if you in this edit dialog box to choose the function of the icon, click the event and generate an icon to select the dialog box, the resulting code is sometimes very illogical, Because obviously you are in the Edit dialog box inside the element loaded under the dialog box, but you see the browser with the HTML ran to the body below, this is not very depressed, this next time you do not refresh the situation click on the Edit dialog box, nothing, in the Click the dialog box icon selection, Make sure that only the HTML under the parent element of the table is processed, but the element below the body is not processed, but the element underneath the body is not fully processed, or the home page is gone, so the elements within the second dialog box are processed after the element in the table is processed, so that the overlapping elements are removed each time. As to how to deal with several kinds of methods, the direct remove aspect of the quick.

Before encountering this kind of problem time did not go deep to solve, perhaps some people will say directly add class to pop up, so that will not duplicate ID, so that the consequences is suddenly pop up N dialog box, does not work, and then I think the solution is not repeated to pop, direct display after the refresh, do not go to re-eject, This will not result in the generation of multiple, just like the Table Editing dialog box, because there is only one, the display will not be closed, after the opening of the time will be processed, so this is no problem, and when I above the problem came, it is impossible to finally show, not closed, so this approach to solve the momentary, But not to solve the problem at all, today in good spirits, wrote a diary.

HTML frames-Multiple dialog boxes (same ID) processing

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.