Is there any method for refreshing a bootstrap model instant of hide because I'm trying to show database data in the model so that when I click data is shown the first time but when I try to show additional data then it displays old data because of the hide event.
var note = $('#note_val').val();
var phone = $('#phone_num').val();
$.ajax({
type:'POST',
data:{phone_no:phone,note:note,todate:todate,fromdate:fromdate},
url:'calls_note.php',
success:function(data) {
if(data == 1) {
$('#info3').hide();
$('#err_msg').show().children('div').html("Error in updating Note").show().fadeOut(10000);
$('#info').hide();
} else {
$('#info3').hide();
$('#err_msg').hide();
$('#info').hide();
$('#note_val').val('');
$("#myModal").modal("hide");
}
}
});
call_note.php
include('config.php');
if(isset($_POST['phone_no'])) {
$no=$_POST['phone_no'];
$notes=$_POST['note'];
$sql = "UPDATE callers SET note='$notes' WHERE phone_no='$no'";
$result=mysql_query($sql);
if($result > 0) {
echo 0;
}
}