jQuery jqGrid触发器reloadGrid [英] jQuery jqGrid trigger reloadGrid
问题描述
我正在使用 jqGrid 来显示搜索.单击搜索按钮时,它将执行以下操作:
I'm using a jqGrid to display the results of a search. When the search button is clicked it does this:
$("#Search").jqGrid('setGridParam', { url: url }).trigger("reloadGrid");
url
包含搜索参数的位置,例如:
Where url
contains the search params, for example:
var url ="/search?first=joe&last=smith"
Web服务器正在接收此URL并作出适当的响应.但是在客户端,它将在jqgrid.min.js第21行中引发此错误:
The web server is receiving this URL and responding appropriately. But on the client side it throws this error in jqgrid.min.js line 21:
Syntax error:
}); b.fn.jqGrid = function(f) {
我该怎么做才能解决此问题?我在其他许多地方都成功地使用了jqGrid,但这是唯一更改URL并重新加载的地方.
What can I do to fix this? I'm using jqGrid sucessfully in many other places, but this is the only one where I'm changing the URL and reloading.
推荐答案
尝试使用此页面上的非最小版本,以了解围绕它的原因的更多背景信息.您看到的是解析停止的地方.我怀疑您的错误还在进一步.通过这种方式,您可以查看当前的URL是否正在使用以及正在抛出什么.
Try using the non minified version on this page to see more context of why it's surrounding. What you're seeing there is a where parsing is halting; I suspect your error is further up. This way you can see if the current url is being used and what's throwing it off.
这篇关于jQuery jqGrid触发器reloadGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!