私は今何日も解決できないこの問題を抱えています...これが私のコードです。$("#btnQuery") をクリックするたびに読み込まれる xmlhttprequest または URL を取得したい。ここで何が起こったのかというと、ボタンをクリックすると、サーバーから jqgrid にデータが表示されます。
$("#btnQuery").click( function() {
var params = {
"ID": $("#eID3").val(),
"dataType": "data"
}
var url = 'process.php?path=' + encodeURI('project/view') + '&json=' + encodeURI(JSON.stringify(params));
$('#tblD').setGridParam({
url:url,
datatype: ajaxDataType,
});
$('#tblD').trigger('reloadGrid');
$('#firstur').append('the url: ' + url+'<br>');//the xmlhttpRequest should disply here in my html
$('#secur').append('response: ' + url+'<br>'); //the response of xmlhttpRequest should display here in my html
});
これが私のprocess.phpのコードです。これは、jqgrid のデータを取得する場所です。
<?php
print(file_get_contents("http://localhost/" . $_GET["path"] . "?json=" . ($_GET["json"])));
?>
firebug コンソールに表示される xmlhttprequest/location は次のとおりです: http://localhost/process.php?....%22:%22%22,%22Password%22:%22%22%7D
レスポンスボディは次のようになります。
{"result":{"ID":"1C1OMk123tJqzbd"}, "time_elapsed":0}
データを取得するためにロードする url/xmlhttprequest を取得する方法を知っている人はいますか? とそのレスポンスボディ?jqgrid とは別に、html ボディに表示したいのですが...助けてくれる人はいますか?..お願いします...どうもありがとう