javascript - Adding grid when the button clicked -


$("#add").click(function () {     debugger;     $('#save2').show();`c#`      $.ajax({         type: "post",         url: "branch_audit_summary.aspx/addempdetails",         data: "",         contenttype: "application/json; charset=utf-8",         cache: false,         success: function (jsondata) {             if (jsondata == undefined)                 { return; }             var data = json.parse(jsondata.d);             var m = data.length;             (var = 0; < m; i++) {                 var rowid = jquery("#list4").getdataids().length;                 jquery("#list4").addrowdata(rowid + 1, data[i]);             }         }     }); }); 

the grid not adding when click.

what jsondata returning...? sending server..? looks nothing.

    data: "", 

you should send error response instead have

if (jsondata == undefined)                 { return; } 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -