Requested unknown parameter '0' for row 0
Requested unknown parameter '0' for row 0
Hi, i have this error
** Requested unknown parameter '0' for row 0**
JSON
{
"anagrafica":
[
{"id":"1","nome":"Fra","cognome":"A...","cf":"CHN........","predefinito":"1"},{"id":"2","nome":"Salva","cognome":".....","cf":"","predefinito":"1"}
]
}
JAVASCRIPT
$('#lista').DataTable( {
"ajax": {
"url": "<?php echo $myurl;?>/<?php echo $myadmin_api;?>/get",
"dataSrc": "anagrafica"
}
});
This question has an accepted answers - jump to answer
Answers
Hi @darkstaring
Because the data contains an array of objects, you need to define the source of the data - see this example here.
So you'll need something like this:
Cheers,
Colin
Thank you @colin now works
I have another question.....
Ajax
how can I pass the argument ID to the function
modifica_paziente, delete_anagrafica
Hi again,
Take a look at this example. This is similar to your goal - to have a clickable control within a cell. Here, the event listener works out which rows the cell is on.
Cheers,
Colin
I do not understand..
any help?
I would suggest that you don't use a DOM0 event, instead use a jQuery event listener like in this example.
Allan
Now i write this...
But not work
Now work's