I want to trigger a dialog modal-message script inside a yes-no logic.
Currently it works in a onclick event. Example: http://jqueryui.com/dialog/#modal-message
I want this to execute automatically (without any click) if my logic is true.
Example:
if Logic is true Then Execute
<script>
$(function() {
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
});
</script>
Any idea?