0

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;
    }
}
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Maksud Mansuri
  • 631
  • 13
  • 26
  • can you show calls_note.php code who makes response please ? – Fky Sep 10 '15 at 09:07
  • Clear Model or Modal? – aldrin27 Sep 10 '15 at 09:07
  • possible duplicate of [Twitter bootstrap remote modal shows same content everytime](http://stackoverflow.com/questions/12286332/twitter-bootstrap-remote-modal-shows-same-content-everytime) – DFayet Sep 10 '15 at 09:08
  • possible duplicate of [How to reset the bootstrap modal when it gets closed and open it fresh again?](http://stackoverflow.com/questions/26863003/how-to-reset-the-bootstrap-modal-when-it-gets-closed-and-open-it-fresh-again) – aldrin27 Sep 10 '15 at 09:10

0 Answers0