php - My popup windows wont show even using script
Get the solution ↓↓↓i have try everything but still doesn't work. My popup windows only up until header and button but it wont show the body where all the data is in.
$(document).on('click','.delete_data',function(){
var delete_id = $(this).attr('id') ;
$.ajax ({
URL : "showbekalan.php",
type : "post",
data = {delete_id:delete_id},
success: function(data){
$("#deleteInfo").html(data);
$("#delete").modal('show');
}
});
});
<!-- Modal content-->
<td class="column100 column6" data-column="column6">
<a href="#delete" type="button" class="btn btn-danger delete_data" id="<?php echo $id ;?>" data-toggle="modal">
<font size="3">Padam</font>
</a>
</td>
<div class="modal fade" id="delete" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
<font size="6px"><b>Padam</b></font>
</h4>
</div>
<div class="modal-body" id="deleteInfo">
<form class="contact100-form validate-form" action="deletebekalan.php?bid=<?php echo $id;?>" method="post" id="deleteForm">
<div class="container-contact100-form-btn">
<button class="contact100-form-btn" id="deleteButt">
<span>
Padam
<i class="zmdi zmdi-arrow-right m-l-8"></i>
</span>
</button>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Tutup</button>
</div>
</div>
</div>
</div>
Answer
Solution:
Try to change this:
$(document).on('click','.delete_data',function(){
var delete_id = $(this).attr('id') ;
$.ajax ({
URL : "showbekalan.php",
type : "post",
data = {delete_id:delete_id},
success: function(data){
$("#deleteInfo").html(data);
$("#delete").modal('show');
}
});
});
to this:
$(document).on('click','.delete_data',function(){
var delete_id = $(this).attr('id') ;
$.ajax ({
URL : "showbekalan.php",
type : "post",
data = {delete_id:delete_id},
success: function(data){
$("#delete").modal('show');
$("#delete #deleteInfo").html(data); //Assuming that modal window has class modal
}
});
});
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to undefined function str_contains()
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.