问题我试图将其他值(作为过滤器)传递给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>