php - Ajax call always return error function -
i have php page, page display in iframe, page contain 1 ajax phone call code shows below
$.ajax({ url: "mindex.php", data: { model: "test", handler: "test_123", data: info }, type: "post", datatype: "json", success: function(response){ if( response.success ){ createchart( response.times ); }else{ $('#chart-container').html( '<p style="margin: 20px 100px; color: rgb(204, 71, 71);">'+response.errors+'</p>' ); } }, error: function(){ alert("unknown error occured"); } });
after run page, display 'unknown error occured'; firebug shows no response (blank).
this page work in localhost, online shows error pls help me
thax in advance
nothing wrong ajax
call.
from mindex.php
must need homecoming output in json
format.
use echo json_encode($response);
in mindex.php
file.
php jquery ajax
No comments:
Post a Comment