While working on some code, I encountered a specific issue:
alertify.dialog("confirm").set(
{
'labels':
{
ok: 'Personal',
cancel: 'Share'
},
'message': 'Select target:',
'onok': function()
{
alertify.confirm($("#dir_select_user").get(0), function()
{
var i = $("#dir_select_user .dir_selector").val();
t.find(".move_des").val(i);
t.find(".move_verify").val("1");
t.submit();
}).set('labels',
{
ok: alertify.defaults.glossary.ok,
cancel: alertify.defaults.glossary.cancel
});
},
'oncancel': function()
{
alertify.confirm($("#dir_select_share").get(0), function()
{
var i = $("#dir_select_share .dir_selector").val();
t.find(".move_des").val(i);
t.find(".move_verify").val("1");
t.submit();
}).set('labels',
{
ok: alertify.defaults.glossary.ok,
cancel: alertify.defaults.glossary.cancel
});
}
}) }).show();
I am utilizing the alertifyjs
library available at (not from ).
If you test this code snippet, you'll notice that the 'onok' and 'oncancel' dialogs quickly vanish upon selecting either 'personal' or 'share'.
What could be causing this behavior? Any suggestions on how to resolve it?