Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 854817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:59:07+00:00 2026-05-15T07:59:07+00:00

I have a dialog that displays a form. When they save or close the

  • 0

I have a dialog that displays a form. When they save or close the dialog I call up the jquery dialog destroy method.

However I am not clear if it removes the html div. From the description I would not think so

Remove the dialog functionality
completely. This will return the
element back to its pre-init state.

However when looking with firebug I can’t see the html container so I am not sure if it gets removed or what. I am not sure if it is because I make the div for the dialog on the fly and use jquery to add it to the page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:59:08+00:00Added an answer on May 15, 2026 at 7:59 am

    It does not destroy the HTML, you can see a demo here. However it does by default hide the container (leaving a display: none on there), so you need to .show() to see it again visually in the page if that’s what you’re after. Here’s the simple demo test code:

    <button>Create Dialog</button>
    <div id="dialog">Test Content</div>
    

    and the jQuery:

    $("button").click(function() {
      $("#dialog").dialog({
        buttons: { 'Destroy Me': function() { $(this).dialog('destroy').show(); } }
      });
    });
    

    Running this you can toggle can element from being a dialog and back again.

    But, if you want to make sure the dialog is destroyed when you create it, simply destroy any possible copies ahead of time. For example:

        //  destroy any previous dialog of same that may exist
        $(".ui-dialog").filter(function(i) { return $(this).children("#dialog").exist(); }).remove();
        $("#dialog").dialog({ 
            /* dialog options */ 
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dialog box that displays a dynamic-sized form. I currently get the
I have an asp:ImageButton that is supposed to popup a save dialog when clicked.
I have a problem with the jquery-ui dialog box . The problem is that
I have a standard jQuery UI dialog. Inside that dialog, I have a custom
I have a v simple dialog box that I would like to display as
I have a dialog that resizes. It also has a custom background which I
I have a dialog box that allows users to set hotkeys for use in
I like to have a popup modal dialog that need to show the list
Modern browsers have multi-tab interface, but JavaScript function window.showModalDialog() creates a modal dialog that
I have a MFC dialog with 32 CComboBoxes on it that all have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.