Dialog closes immediately



  • On call. dialog There's a window and closes, and the question is, how do you not close?

    var date=$('input[type="text"]');
    $('form').find('input[type="submit"]').on('click',function (){
    
    if (date.val()==""){
        alert('Строка пустая')
    }
    else {
         $( function() {
                $("#dialog").dialog();
    
        } );
    
    }
    

    })



  • You're not interrupting your current operation.

    var date=$('input[type="text"]');
    $('form').find('input[type="submit"]').on('click',function (){
    
    if (date.val()==""){
        alert('Строка пустая')
    }
    else {
         $( function() {
                $("#dialog").dialog();
    
        } );
    
    }
    return false;
    

    })




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2