0

I have this dialog code

// load dialog to user signup
function new_user_signup()
{
    $.get("/actions/_new_user_account.php",
    function(data){
        $("#dialog").html(data);
    });
    $("#dialog").dialog({ width: 400,resizable: false, position: 'top', draggable: false,     title: 'Opret profil' });
}

if I click on X icon in the top right, and try to open my dialog again, i can't.

How to open the dialog again?

1
  • You can't do what after click on X icon and reopen again? Step 1. phrase your question clearly. Commented Sep 15, 2009 at 18:32

2 Answers 2

2

You must use the open method to reopen the dialog:

$("#dialog").dialog('open');
Sign up to request clarification or add additional context in comments.

Comments

1

You need to initialize it once and then reopen it each time you call your function. Something like this:

// initialize dialog after page is loaded, pay attention to "autoOpen: false"
$(document).ready(function(){
    $("#dialog").dialog({ width: 400,resizable: false, position: 'top', draggable: false,     title: 'Opret profil', autoOpen: false });
});

// load dialog to user signup
function new_user_signup()
{
    $.get("/actions/_new_user_account.php",
        function(data){
            $("#dialog").html(data);
        }
    );
    $("#dialog").dialog('open');
 }

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.