从打开的Jquery对话框中获取答案并关闭它

时间:2015-12-09 08:56:19

标签: jquery jdialog

我有这个模态对话框HTML:

<div id="exit_without_save" style="overflow: hidden; text-align: center"
    title="CANCEL EVENT">
</div>

当我在jQuery对话框中单击关闭按钮时,另一个jQuery对话框以这种方式打开:

    function verifyEmptyFields()
    {   
      $("#exit_without_save").dialog({
            modal: true,
            autoOpen: false,
            resizable: false,
            height: 116,
            width: 577
        });

         /*
       part of checking empty fields return noempty = true if one of fields is not empty
    */
      if(noempty)
    {
         $("#exit_without_save").dialog("open");
            $("#exit_without_save").html("<span class='testoAttenzione'>Warning!</span><br><span class='testoMessaggio'>There are no empty fields. Do you really want exit without save them?</span><br /><a id='bYes' class='bYesNoClass' style='cursor:pointer'>SI</a>&nbsp;&nbsp;&nbsp;<a id='bNo' class='bYesNoClass' style='cursor:pointer'>NO</a>");

    }
}

如何获得bNo或bYes点击的答案?对话框返回true(单击是)或返回false(单击否)。 谢谢 马库斯

0 个答案:

没有答案