I use my code as bellow. The function get_devcies_full is call ever 5times if the dialog opens already Don't opent it again just update the content Then i will code Bellow i the got the error in javascript
cannot call methods on dialog prior to initialization; attempted to call method isOpen
function get_devcies_full(id,slno)
{
$.post("user/get_full_device/" +id + "/" +slno,
function(data) {
var NewDialog = $('<div id="MenuDialog"></div>');
if (NewDialog.dialog( "isOpen" )!==true){
NewDialog.dialog({
modal: true,
title: "Title",
width :940,
height:600,
});
}
NewDialog.html(data);
var t = setTimeout(function () {get_devcies_full(id,slno);},5000);
}
);
}
Please give solution where i got problem?