I have this code that is to open a dialog box with content generated from a php class only problem is that within 2sec the code gets clear from the dialog box. Here is the JavaScript/JQuery:
$k('#CreateTable').click(function(e){
e.preventDefault();
var Call = $k('#CreateTable').attr('value');
var util = $k(this).attr('id');//.attr('value');
// alert(util);
$k('#dialog').dialog({
autoOpen: false,
title: 'Running Utility for: '+Call,
modal: true,
width: 450,
close: function(event, ui) {
$k("#dialog").empty(); // remove the content
}//END CLOSE
}).dialog('open');
$k.ajax({
type: "post",
url: "inc/runUtilities.php",
dataType: "html",
data: {
'utility' : util
},
success: function(data) {
//alert('success');
$k('#DlgTxt').html(data).fadeIn('slow');
}
});
//return false;
});//END DIALOG
It gets triggered from the following button code:
<div class="tab-pane fade in active" id="Utilities">
<p>
<div>
<button class="btn btn-lg btn-default" type="button"
value="Create Table" id="CreateTable" >Create Table</button>
</p>
</div>
</div>
Is there something i am missing?