他の値を (フィルターとして) jquery ブートグリッドに渡そうとしています。私のフォームには 2 つの日付範囲があり、日付が変わるたびにグリッド データを更新する必要があります。
ハンドラーrequestHandlerと (廃止された) postを使用すると、標準を尊重する他のパラメーターをサーバーに渡すことができます
しかし、リクエストを投稿すると、カスタム パラメータを追加できません。firebugを使用すると、次のような標準パラメーターのみが表示されます
current=1
rowCount=10
searchPhrase=
私を助けてください!!
私の完全なHTMLコードの下
<table id="grid-data" class="table table-condensed table-hover table-striped" data-toggle="bootgrid" data-ajax="true" data-url="HelpDesk/server.php">
<thead>
<tr>
<th data-column-id="ticket_no" data-type="string" data-identifier="true">ticket_no</th>
<th data-column-id="title">title</th>
<th data-column-id="parent_id" data-type="string">parent_id</th>
<th data-column-id="contact_id" data-type="string">contact_id</th>
<th data-column-id="status">status</th>
<th data-column-id="priority" data-type="string">priority</th>
<th data-column-id="smownerid" data-type="string">smownerid</th>
</tr>
</thead>
</table>
そして私のjs/jqueryコード
<!-- now write the script specific for this grid -->
<script language="javascript">
jQuery( document ).ready(function() {
var grid = $("#grid-data").bootgrid({
ajax: true,
url: "HelpDesk/server.php",
//requestHandler
//Transforms the JSON request object in what ever is needed on the server-side implementation.
// Default value is function (request) { return request; }.
requestHandler: function(request)
{
console.log("requestHandler - nevel called");
console.log(request);
return request;
}/*,
post: function ()
{
console.log("post - nevel called");
return {datefrom:'aaaaaaaaa',dateto:'vvvvvvvvvv'};
}*/
});
$('input[name="srch"]').click(function(){
$("#grid-data").bootgrid("reload");
});
});
</script>