Persistent error: Requested unknown parameter '0' for row 0, column 0

Persistent error: Requested unknown parameter '0' for row 0, column 0

lpacelpace Posts: 12Questions: 6Answers: 0

test here: http://aomppapp.gmaom.us:8080/get_cotg_form?id=dashboard2.html
uzoqik
Requested unknown parameter '0' for row 0, column 0
my project receives JSON data via AJAX. I get this error consistently and I don't know why.
My code is below:
$('.rma_load').click( function(){

$('#rmas').DataTable({
"ajax":
{"url": "http://aomppapp.gmaom.us:9090/get_RMA?PO_NUM=*",
"columns": [
{ "data": "Record.ID" },

             ],
                    },

                    });

});

This question has an accepted answers - jump to answer

Answers

  • lpacelpace Posts: 12Questions: 6Answers: 0

    I should have mentioned that when you visit my link, click on the RMA tab and you'll see the error.

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    Answer ✓

    The problem is you have your columns definition inside the ajax option:

    $('#rmas').DataTable({                  
      "ajax": 
      {"url": "http://aomppapp.gmaom.us:9090/get_RMA?PO_NUM=*",                         
       "columns": [
         { "data": "Record.ID" },
    
       ],
      },
    
    });
    

    Move it outside like this:

    $('#rmas').DataTable({                  
      "ajax": 
      {"url": "http://aomppapp.gmaom.us:9090/get_RMA?PO_NUM=*",                         
      },
       "columns": [
         { "data": "Record.ID" },
    
       ],
    
    });
    

    Kevin

  • lpacelpace Posts: 12Questions: 6Answers: 0

    oh man, stupid mistake! thanks!

Sign In or Register to comment.