JQuery Editable数据网格突然无法在firefox中运行

时间:2016-09-24 09:56:54

标签: javascript jquery grails datagrid

在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();
    }

1 个答案:

答案 0 :(得分:0)

我有解决方案

FireFox中的location.reload在远程函数之前执行。