I need to open (call) a ui-dialog box from a function javascript. Currently I have these two codes:
setTimeout(function() {
var zone = event.getTarget().getName();
var x = window.confirm("Do you want to continue?");
if (x) {
readData();
} else {
e.preventDefault();
}
}, 0);
and,
$( "#dialogZone" ).dialog({
autoOpen: false,
show: "blind",
hide: "blind",
modal: true,
buttons: {
"YES": function() {
$(this).dialog("close");
readData();
},
Cancel: function() {
$(this).dialog("close");
//avoid some info windows in #tab1
}
}
});
$( "#openEvent" ).click(function() {
$( "#dialogZone" ).dialog( "open" );
return false;
});
});
Please, can I have some thing like...
setTimeout(function() {
// show ui-dialogbox
}
Thanks in advance for your answers. Regards.