HTMLコードを返す単純なajax呼び出しがあります。
//=======-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-==-=-=-=-=
//SEARCH Submit ===============================================================================
$('.clicked_search').live("click",function() {
var from = $('#from').val();
var to = $('#to').val();
var sel = $('#sel').val();
var BegDT = new Date(from);
var EndDT = new Date(to);
var sum = BegDT - EndDT;
alert (BegDT +" b"+ EndDT +" e"+ sum);
if(sum > 0 | from == "" & to != "" | from != "" & to == ""){
$('.inv_date').show();
}
else{
$("#app_panel").html('<div id="flash" align="left" ><img src="img/clientimg/ajax.gif" align="absmiddle"> <span class="loading">Loading Request...</span></div>');
$("#clock").html('<div id="flash2" align="left" ><img src="img/clientimg/ajax.gif" height="15px" align="absmiddle"> <span class="loading"><font size="1">Loading Request...</font></span></div>');
$.ajax({
type: "POST",
url: "database/clientpanel/logs/search_call_log.php",
data: {
from: from,
to: to,
sel: sel
},
cache: false,
success: function(html){
$("#flash").hide();
$('.inv_date').hide();
$("#app_panel").append(html);
}
});
$.ajax({
url: "database/clientpanel/logs/search_clock_log.php",
cache: false,
success: function(html){
$("#flash2").hide();
$('.inv_date').hide();
$("#clock").append(html);
}
});
}
return false;
});
しかし、ajaxが呼び出したphpから生成された値を返すことも望んでいます。
session_start();
include("../../dbinfo.inc.php");
// connect to the database
$client_id = $_SESSION['clientid'];
//===========THIS PHP VALUES RIGHT HERE===================================
$out = 0;
$in = 0;
$ext =0;
$min = 0;
$sec = 0;
//====================================================================
$query=" select * from call where client='$client_id' ORDER BY date_time DESC";
$result = $mysqli->query($query);
1回のajax呼び出しを使用して、「htmlコード」を「php値」と一緒に返すにはどうすればよいですか?