I am using $(selector).dialog(); to call a tag in my html code. When I click on the link that sends me to this dialog, firebug (a firefox add on) shows that the tag gets erased!! The html code in the tag gets displayed fine the first time, but when the dialog box is closed by the default X in the upper corner, the dialog box won't reappear another time if I click on the link. This is the code that is inside of the click event.
$("#dialog").dialog({
resizable: false,
height:140,
modal: true,
autoOpen: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Delete this item': function() {
$.get("delete.php", { food: foodID } );
pausecomp(1000);
$.get("CategoryAdmin.php", { course: courseID },
function(data){
//alert("in updateDisplay() "+c);
$("#"+courseID).html(data);
operationStripe();
editCue();
});
return false;
$(this).dialog('close');
},
Cancel: function() {
$(this).dialog('close');
}
}
});