jeditable-datatables,验证“值";发布之前 [英] jeditable-datatables , validate "value" before posting

查看:88
本文介绍了jeditable-datatables,验证“值";发布之前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将jEditable与Datatables一起使用. POST之前如何验证输入的值":

I am trying to use jEditable with Datatables. How to go about validating the input "value" before POSTing:

这是代码正在使用

oTable = $('#myTable').dataTable( {         
    "fnDrawCallback": function(){
        $('td:eq(4)', this.fnGetNodes()).editable('<url>',  {
                "callback": function(sValue, y) {
            var aPos = oTable.fnGetPosition(this);
            oTable.fnUpdate(sValue, aPos[0], aPos[1]);
        }
    });
     }  
});

EDIT (验证码)应该放在哪里?之前

EDIT where should the validation code go? before

$('td:eq(4)', this.fnGetNodes()).editable('<url>', {

或更早

oTable.fnUpdate(sValue, aPos[0], aPos[1]);

推荐答案

我最终通过使用"submitdata"选项发送其他必需的URL参数,在服务器上进行了验证.

I ended up doing the validations at the server by sending additional required URL parameters using the "submitdata" option.

这篇关于jeditable-datatables,验证“值";发布之前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆