問題我試圖將其他值(作爲過濾器)傳遞給jquery bootgrid。在我的表單中,我有兩個日期範圍,每次更改日期時都需要刷新網格數據。jquery bootgrid requestHandler/post reload
處理器requestHandler和(過時)後讓我傳遞給服務器的其他PARAMS尊重標準
但是,當我張貼了我的請求,我不能添加我的自定義參數。隨着螢火蟲我可以看到只有標準參數喜歡
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>