When the dialog
called, a window appears and closes immediately, the question is how to prevent it from closing?
var date=$('input[type="text"]'); $('form').find('input[type="submit"]').on('click',function (){ if (date.val()==""){ alert('Строка пустая') } else { $( function() { $("#dialog").dialog(); } ); } })