how to close the editor popup after successComplete of ajax POST and refresh table page

how to close the editor popup after successComplete of ajax POST and refresh table page

GE PowerGE Power Posts: 10Questions: 2Answers: 0
edited May 2017 in Free community support
 var editor = new $.fn.dataTable.Editor( {
               ajax: {
                   url: "../updatedata",
                   type: "POST",
                   dataType: "json",
                   data: function ( d ) {
                    
                      $.each(d.data, function (key, value) {
                           output.data.push(d.data[key]);
                         //  console.log(d.data[key]);
                          
                       });
                       return JSON.stringify(output.data[0]);
                     
                   },
                   complete: function (xhr,text) {
                     // alert(xhr.status);
                          editor.hide();

                      table.ajax.reload();
                   },
              headers: { 
                       'Accept': 'application/json',
                       'Content-Type': 'application/json' 
                       },
                    
               },
               
               table: "#Table1",

......
......

i am trying this its close the editor form popup but next time its not poping up on the selection of table row check box.
Please advise.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,740Questions: 1Answers: 10,111 Site admin
    Answer ✓

    The key is what the ../updatedata script is returning. Is it conforming to the data Editor expects? If not, what is it returning?

    Allan

  • GE PowerGE Power Posts: 10Questions: 2Answers: 0

    Thanks Allen for help, it worked

This discussion has been closed.