Hocam sen hem submit yapıyorsun hem de submit butonuna modal target eklemişsin. Mantığını değiştirmen lazım hocam.
Hocam kodlarda bazı yerlerde düzenleme yaptım şimdi modal açılmıyor
<div class="modal fade" id="myModal">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title">Kredi Hesap Detayı</h3>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<h5 class="text-center">Başlık</h5>
Tablo Gelecek
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default " data-dismiss="modal">Kapat</button>
</div>
</div>
</div>
</div>
<div class="widget">
<h3 class="sidebar-title">Kredi Hesaplama</h3>
<form class="mortgage-calc" id="myModal">
<div class="calc-input">
<input type="text" class="form-control" name="kredi" placeholder="Kredi Tutarı" required />
<label class="fa fa-try"></label>
</div>
<div class="calc-input">
<select class="form-control" name="vade" required>
<option value="12">12 Ay</option>
<option value="24">24 Ay</option>
<option value="36">36 Ay</option>
<option value="48">48 Ay</option>
</select>
<label class="lni-calendar"></label>
</div>
<div class="calc-input">
<input type="text" class="form-control" name="faiz" placeholder="Faiz Oranı" required />
<label>%</label>
</div>
<div class="calc-input">
<input type="text" class="form-control" name="bsmv" value="0.05" placeholder="BSMV" />
<label>BSMV</label>
</div>
<div class="calc-input">
<input type="text" class="form-control" name="kkdf" value="0.15" placeholder="KKDF" />
<label>KKDF</label>
</div>
<button type="submit" id="userinfo" class="btn btn-common">Hesapla</button>
</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#userinfo").click(function(){
$(".modal-body").html("loading");
var kredi = $(this).data("kredi");
var vade = $(this).data("vade");
var faiz = $(this).data("faiz");
var bsmv = $(this).data("bsmv");
var kkdf = $(this).data("kkdf");
$.ajax({
url:"kredihesapla.php",
type:"POST",
data: {kredi:kredi, vade:vade, faiz:faiz, bsmv:bsmv, kkdf:kkdf},
success: function(response){
$(".modal-body").html(response);
$("#myModal").modal("show");
},
error:function(err){
alert("error"+JSON.stringify(err));
}
});
});
});
</script>