I do not see where you instantiated your dialog, like so (as an example):
$("#registerForm").dialog("close");
function onRegisterPostSucces(data){
$("#registerForm").hide();
$("#registerBar").dialog('close');
$("#registerDialog").text(data);
$("#registerDialog").dialog( "open" );
// this is just an an example, you probably don't need this.
$("#registerForm").dialog({
autoOpen: false,
height: 300,
width: 300,
modal: true,
// etc.. other things
close: function() {
$(this).dialog("close");
}
});
My guess is that you didn't instantiate it yet or the 'this' reference is not correct? Sorry if I am offbase, as I do not have eyes on the full breadth of your code.