在Grails中插入少量记录并且ajax调用无效后,可编辑的datagrid jQuery无法在firefox中运行。
这是我的代码(远程函数grails)
function saverow(target){
$("#alertId").empty();
$('#tt').datagrid('endEdit', getRowIndex(target));
var row;
if(tempRow.lookUpValue==""){
$("#alertId").append("<div class='alert alert-danger'>Lookup value is required</div>");
return false;
}
if(tempRow.displayValue==""){
$("#alertId").append("<div class='alert alert-danger'>Display value is required</div>");
return false;
}
if (row){
var parameters = {"id":tempRow.id,"lookUpListType":b,"lookUpValue":tempRow.lookUpValue,"displayValue":tempRow.displayValue,"status":tempRow.activeStatus}
${remoteFunction (
controller: 'tblLookUp',
action: 'saveLookUp',
params: 'parameters',
update: 'modalOpenBxx12'
)};
}
else
{
var parameters = {"id":tempRow.id,"lookUpListType":b,"lookUpValue":tempRow.lookUpValue,"displayValue":tempRow.displayValue,"status":tempRow.activeStatus}
${remoteFunction (
controller: 'tblLookUp',
action: 'saveLookUp',
params: 'parameters',
update: 'modalOpenBxx12'
)};
}
location.reload();
}
答案 0 :(得分:0)
我有解决方案
FireFox中的location.reload在远程函数之前执行。