[ad_1]
I have a bootstrap modal and ı need to change some elments in that modal.
how can ı reach the elements in the modal?
this is my modal and modal button:
<button name="degistir" type="button" id="gunmodal" value="<?php echo $postacek["product_id"]; ?>" class="btn btn-outline-success btn-primary" data-bs-whatever="ali" data-bs-toggle="modal"data-bs-target="#inlineForm" >Düzenle</button>
<div class="modal fade text-left modalss" id="inlineForm" tabindex="-1"
role="dialog" aria-labelledby="myModalLabel33" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable"
role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel33">Güncelleme</h4>
<button type="button" class="close" data-bs-dismiss="modal"
aria-label="Close">
<i data-feather="x"></i>
</button>
</div>
<form id="guncelleformveri" >
<div id="formveri" class="bg-primary" style="width: 200px; height: 200px;"></div>
</form>
</div>
</div>
</div>
this is jquery ajax method:
$(document).ready(function(){//kategori ekle
$("#gunmodal").on("click", function(){ // buton idli elemana tıklandığında
var val=$(this).val();
alert(val);
$.ajax({
url:'veri.php', // serileştirilen değerleri ajax.php dosyasına
type:'POST', // post metodu ile
data:val, // yukarıda serileştirdiğimiz gonderilenform değişkeni
success:function(e){ // gonderme işlemi başarılı ise e değişkeni ile gelen değerleri aldı
$("#formveri").html("").html(e); // div elemanını her gönderme işleminde boşalttı ve gelen verileri içine attı
}
});
});
});
[ad_2]