bisanedev
bisanedev

Reputation: 15

Not able to open the JqueryUI Dialog Again and again

this the jqueryUI

$(function() {
$( "#dialog" ).dialog({
autoOpen: false,modal: true,
show: {
effect: "bounce",
duration: 1000
},
hide: {
effect: "fade",
duration: 1000
},
open: function ()
            {
                $(this).load('password.php');
            },
        height: 400,
            width: 400,
            title: 'Dynamically Loaded Page',           
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
});
});

html

<a href="#" id="opener">Open Dialog</a>
<div class="dialog" id="dialog" title="Basic dialog"></div>

This work should be , if the password.php only contain text . however when password.php contain mysql query , can't open dialog again and again ? no error in console window, but no able open dialog again as previously excepting press F5 / refreshing page. what the problem ? thank

Upvotes: 1

Views: 262

Answers (1)

Ravi Gadag
Ravi Gadag

Reputation: 15881

add close event handler.

$( "#dialog" ).dialog({
// your previous code as it is 
 ,close: function( event, ui ) {$( "#dialog" ).dialog( "destroy" );}      
});

Upvotes: 1

Related Questions