0

How to you trigger a tab to open once the close button on a modal dialog is opened? This is the code I have so far and it only presents me with a the error message in plain text.

<script>
$(function() {
$( "#dialog-message" ).dialog({
    modal: true,
    buttons: {
    Ok: function() {
    $( this ).dialog( "close" );}}
    });
$("#tabs").tabs("select",1);
    return false;
        });
});
</script>
<div id="dialog-message" title="Incorrect password">
    The password you have provided is incorrect.<br>Please try again.
</div>
methuselah
  • 12,766
  • 47
  • 165
  • 315

1 Answers1

1

Modified from Hook into dialog close event

 $('div#dialog-message').bind('dialogclose', function(event) {
    $("#tabs").tabs("select",1);
 });

Or try this:

$( "#dialog-message" ).dialog({
    modal: true,
    buttons: {
        Ok: function() {
        $( this ).dialog( "close" );
        }
    },
    close: function(){
        $("#tabs").tabs("select",1);
    }
});
Community
  • 1
  • 1
Kaizen Programmer
  • 3,798
  • 1
  • 14
  • 30