I have a code that uses ajax to check if something is true so for example:
$.ajax({
type: 'get',
url: ACTION_URL
dataType: 'json',
success: function(result) {
if (result && result.success) {
$('#JQUERY_UI_DIALOG').dialog('open');
}
}
});
Now this ajax runs every few seconds. If user has multiple tabs open in browser of a same page or different page and dialog opens on one tab, it opens on all tabs.
If user closes or accepts on one tab's dialog, the other ones do not close so user has to go through all tabs and do it manually.
Is there a way I could make other tabs close that dialog if on at least on of the tabs it was closed? or do not even open it if it was opened on one tab.