我使用jQuery和jqGrid插件。 當我嘗試在jqGrid中使用表單搜索時,JavaScript異常在螢火蟲中引發。jqGrid搜索拋出異常
未捕獲的異常:語法錯誤,無法識別的表達式:[@selected]
和復位也無法正常工作 請人幫我....
感謝, 桑迪普
編輯:
jQuery("#list").jqGrid({
url:'/getdata.jsp',
datatype: 'xml',
mtype: 'GET',
colNames:['PSM ID','PSM Name','Responsibility','Date of Join(MM/dd/yyyy)','Date of Leaving(MM/dd/yyyy)','Designation','Organisation','Location','Phone Number','Email'],
colModel :[
{name:'PSM_EMP_ID',index:'PSM_EMP_ID',editable:false, width:75},
{name:'PSM_EMP_Name',index:'PSM_EMP_Name',editable:true,width:100,editrules:{required:true,edithidden:false}},
{name:'RESPONSIBILITY',index:'RESPONSIBILITY',editable:true,width:100},
{name:'DATE_OF_JOIN',index:'DATE_OF_JOIN',width:90,editable:true,edittype:'text',editrules:{required:true},editoptions: {
size: 10, maxlengh: 10,id:'datepicker1',dataInit: $(function(elem) {
$("#datepicker1").datepicker({showOn: 'button',buttonImage:'/images/calendar.gif',
buttonImageOnly: true});
})
}
},
{name:'DATE_OF_LEAVING', index:'DATE_OF_LEAVING', editable:true,width:110},
{name:'DESIGNATION', index:'DESIGNATION',editable:true,editrules:{required:true},width:100},
{name:'ORGANISATION', index:'ORGANISATION',editable:true,editrules:{required:true},width:180},
{name:'LOCATION', index:'LOCATION', editable:true,editrules:{required:true},width:100},
{name:'PSM_PHONE_NUMBER', index:'PSM_PHONE_NUMBER',editrules:{required:true},editable:true,width:100},
{name:'PSM_EMAIL', index:'PSM_EMAIL', editable:true,editrules:{required:true},width:220}],
pager: jQuery('#pager'),
rowNum:10,
rowList:[10,20,30],
sortname: 'user',
sortorder: "desc",
viewrecords: false,
multiselect:false,
imgpath: '/themes/steel/images',
caption: 'PSM',
editurl: '/update.jsp', shrinkToFit: true
/*width:1200 */}).navGrid('#pager',{add:true,addtext:'Add',edit:true,edittext:'Edit',del:true,deltext:'Del', search:true,searchtext:'Find'/*,refresh:true*/}, /*options*/
{height:300,width:500,reloadAfterSubmit:true}, /* edit options*/
{height:300,width:500,reloadAfterSubmit:true}, /* add options*/
{reloadAfterSubmit:true}, // del options
{} // search options
);
這是所使用的代碼...
您應該包含可用於重現問題的代碼。在你已經給datepicker演示的 – Oleg 2011-04-11 07:18:18