• 28-11-2020, 21:32:36
    #1
    merhaba, altta ki kodda html5 required'i nasıl kullanabilirim?

     function commentadd(){    $("#wait").html("Gönderiliyor...").prop("disabled", true);    $.ajax({      type: "POST",      url: "inc/functions.php",      data: $("#commentgonder").serialize(),      success: function(cevap){
            if (cevap=="do") {          $("#wait").html("Gönderildi...").prop("disabled", true);          swal({            title: "Yorumunuz eklendi!",            icon: "success",            button: "KAPAT",          });          setTimeout('window.location.reload();', 500);        }else if (cevap=="no"){          $("#wait").html("ONAYLA").prop("disabled", false);          swal({            title: "Yorumunuz eklenirken bir hata oluştu!",            icon: "error",            button: "KAPAT",          });        }else if (cevap=="bos"){          $("#wait").html("ONAYLA").prop("disabled", true);          swal({            title: "Lütfen tüm alanları eksiksiz doldurun!",            icon: "error",            button: "KAPAT",          });        }      }    });  }
  • 28-11-2020, 22:06:27
    #2
    PHP & Flutter & Laravel
    Ajax istek yapmadan önce inputların boş olup olmadığını kontrol edin. Basit yoluyla ABC.strlen==0 uyarı versin elseif cde.strlen==0 uyarı versin hepsi tamam olunca Ajax çalışsın