I'm trying to integrate jquery calendar week with my database for it
to load all the events to be started, but I can not.
Following codes:
demo.js:
data : function(start, end, callback) {
var cliente = $("#idCli").val();
$.getJSON("searchAgenda", {
idCli:cliente
}, function(result) {
alert(result);
callback(result);
}
);
}
searchAgenda (php file):
...
$arr[]=array(
'id' => $ln["id_agenda"],
'title'=> $ln["nm_agenda"],
'start'=> date("c", strtotime($ln["start"])),
'end' => date("c", strtotime($ln["end"]))
);
}
echo json_encode($arr);
...
This returns something like:
[{"ïd":"1","title":"teste","start":"2010-04-08T10:00:00-03:00",
"end":"2010-04-08T11:30:00-03:00"}]
When I call $. post () instead of $. GetJSON is returned an error
"Error: 'length' is null or not an object" and when I call $. GetJSON
is not displayed a error message and also does not show the alert
(result).
Sorry for my bad English.
Thanks in advance