|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
{ name: 'SecurityNumber', index: 'SecurityNumber', width: 100, editable: true, editoptions: { maxlength: 11, size: 50 }, editrules: { required: true, integer:true, custom: true, custom_func: check_securitynumber } }, function check_securitynumber(value, colname) { var rowid = jQuery('#jsonmap').jqGrid('getGridParam', 'selrow'); $.ajax({ url: '/SecurityService/CheckSecurityNumber', type: 'POST', data: { securitynumber: value, userId: rowid }, success: function (data) { if (data.exist) { result = [false, data.msg]; } else { result = [true, ""]; } } }); return result; } |
1.)First attempt in edit form click button save and getting error:
Uncaught ReferenceError: result is not defined
2.)Second attempt in edit form click button save, everything is ok.
Guriddo jqGrid JS 4.7.0 (2014-12-08)
Why am I getting this error when the first try?
Thank you.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top