I created one data table and added data to it up this it is fine.But onchange of one control i need to take that control value and pass to "Getclassifiedmails" method,while doing this onchange event iam facing issue like "Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.".I searched in google,they told some solutions like "retrieve:true" etc.But nothing is working in my case.Can anyone please help me?Below is my code
- <div class="panel panel-primary" id="inboxdetailsgroupbox">  
-                <div class="panel-heading">  
-                   <h4 class="panel-title">Inbox Details</h4>  
-                </div>  
-                <div class="panel-body">  
-                  <table id="Getmaildetailstable" class="table table-striped display" width="100%" >  
-                      <thead>  
-                         <tr>  
-                            <th><input name="select_all" value="1" type="checkbox"></th>  
-                            <th>Starredflag</th>  
-                            <th>Importantflag</th>  
-                            <th>Mailid</th>  
-                            <th>Mailbox</th>  
-                            <th>LogicalID</th>  
-                            <th>Starred</th>  
-                            <th>Important</th>  
-                            <th>Subject</th>  
-                            <th>attachments</th>  
-                            <th>mailsize</th>  
-                            <th>Created On</th>  
-                            <th>Received On</th>  
-                            <th>From</th>  
-                            <th>To</th>  
-                            <th>Incident_no</th>  
-                            <th>classification</th>  
-                            <th>Attachments</th>  
-                         </tr>  
-                      </thead>  
-                   </table>  
-                </div>                                      
-             </div>   
-               
- function getmailsdata()  
-          {  
-                     $.cordys.ajax({  
-                     method: "Getclassifiedmails",  
-                     namespace: "http://schemas.cordys.com/IMSPackage",  
-                     parameters: {  
-                         emailbox:$("#inp_mailbox").val(),  
-                         emailid:'',  
-                         classification:$("#classifiedtype").val(),  
-                         incidentno:'',  
-                         subject:'',  
-                         fromdate:'',  
-                         todate:'',  
-                         body_content:''  
-                     },  
-                     dataType: '* json',  
-                      success: function (result) {   
-                      if (Getmaildetailstable != null) {  
-                         Getmaildetailstable.destroy();  
-                     }  
-                     Getmaildetailstable = $('#Getmaildetailstable').DataTable({  
-                            "retrieve": true,     
-                             "data": ((result.tuple == undefined) ? [] : ((result.tuple.length == undefined) ? [result.tuple] : result.tuple)),  
-                             "columns": [{  
-                                     className: 'dt-body-center',  
-                                     'render': function (data, type, full, meta){  
-                                       return '<input type="checkbox">';  
-                                      },  
-                                     "targets": 0,  
-                                 }, {  
-                                     "targets": 1,  
-                                     "data": "old.EMAIL.STARRED_FLAG",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 2,  
-                                     "data": "old.EMAIL.IMPORTANT_FLAG",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 3,  
-                                     "data": "old.EMAIL.EMAIL_ID",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 4,  
-                                     "data": "old.EMAIL.EMAILBOX",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 5,  
-                                     "data": "old.EMAIL.LOGICAL_ID",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 6,  
-                                      defaultContent: "",  
-                                     "data": "image",render: getStarredflag,  
-                                     visible: true,  
-                                 }, {  
-                                     "targets": 7,  
-                                      defaultContent: "",  
-                                     "data": "image",render: getImportantflag,  
-                                     visible: true,  
-                                 }, {  
-                                     "targets": 8,  
-                                     "data": "old.EMAIL.SUBJECT",  
-                                     visible: true,  
-                                 }, {  
-                                     "targets": 9,  
-                                     "data": "old.EMAIL.attachments",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 10,  
-                                     "data": "old.EMAIL.MAIL_SIZE",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 11,  
-                                     "data": "old.EMAIL.CREATE_DATE",  
-                                     visible: true,  
-                                 }, {  
-                                     "targets": 12,  
-                                     "data": "old.EMAIL.RECEIVE_DATE",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 13,  
-                                     "data": "old.EMAIL.FROM_ADDRESS",  
-                                     visible: true,  
-                                 },  {  
-                                     "targets": 14,  
-                                     "data": "old.EMAIL.TO_ADDRESS",  
-                                     visible: true,  
-                                 }, {  
-                                     "targets": 15,  
-                                     "data": "old.EMAIL.INCIDENT_NO",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 16,  
-                                     "data": "old.EMAIL.CLASSIFICATION_TYPE",  
-                                     visible: false,  
-                                 }, {  
-                                     "targets": 17,  
-                                     "data": "image",render: getImg,  
-                                     visible: true,  
-                                 }  
-                                 ]  
-                         });  
-                     },  
-                     async:false,  
-                     error: function(err){  
-                         console.log(err);  
-                     },  
-                      order: [  
-                      [4, 'asc']  
-                  ],  
-                     });  
-                     }  
-                       
-                       
-