Custom action when dialog close
Hi,
I have this dialog:
- <div id="dialogAlert" data-role="popup" data-overlay-theme="b" data-theme="b" data-dismissible="false" style="max-width: 400px;">
- <div id="divTitle" data-role="header"><h1 id="headerTitle"><label id="msgHeader" style="font-size: large; font-weight: bold;" /></h1></div>
- <div role="main" class="ui-content">
- <p id="msgAlert"></p>
- <a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">Close</a>
- </div>
- </div>
when error I am using:
- $('#divTitle').css("background-color", "#FF0000");
- $('#msgHeader').text("Error!");
- $('#msgAlert').html("Please enter the new password!<br><br>Password must be at least 5 digits.");
- $('#dialogAlert').popup();
- $("#dialogAlert").popup("open");
and when success I am using:
- $('#divTitle').css("background-color", "");
- $('#msgHeader').text("Thank you");
- $('#msgAlert').html("You must confirm the new password<br><br>Please check your email to confirm.");
- $('#dialogAlert').popup();
- $("#dialogAlert").popup("open");
I want to know how to redirect to home.php when success after closing the dialog if I am using same dialog for fail and success?
Thanks,