Jquery UI dialog close
Jquery UI dialog close
I'm loading a dialog and inside it an iframe to show a form. After
posting the forum via ajax I analyze the response and want to close
the dialog (born from the parent window) if the response is a
'success'. Nothing works....any idea how I can make this thing work?
Here's my code:
// post the data
$.post(url, jQuery('#frm_new_folder').serialize(), function (data){
// if the response is success, close the dialog
that was opened from the parent window
if ( data == 'success' ) {
var d = $(window.parent.document).find
('#dialog');
d.dialog('close');
}
else {
$('#file_manager_new_folder_receiver').html
(data);
}
});
P.S. Sorry if it's a duplicate. I'm so lost in this napple/google
thing,