Please help! I have designed a dashboard that uses gadgets. One of the gadgets creates a dialog but every time that the gadget is refreshed, it creates another dialog with the same id. This dialog contains a form, so there are issues with getting and submitting the value of my inputbox since there are identical id's on my page.
What is the best way to destroy newly created dialogs and then removing that div from the DOM without affecting my initially created dialog?