Hello Everybody,
I have a problem with including a .php file into a javascript code. This is a calendar, and I want the calendar to use my database data. So here is my code of the javascript:
<script type='text/javascript'>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
events: "http://.../events.php",
});
});
</script>
As you can see, there is the "events: link" part, where I include my events.php file what shows this if I open:
[{"id":"7","title":"Naspolya utca","start":"2013-10-05T08:30","end":"2013-10-05T08:30","allDay":false}]
So far so good, if I paste this content instead of the http://.../events.php this will work. But with the link I include there, it doesn't. So I think I am doing something wrong with including the link there or sth like that...
I would be really happy if you could help me.
If something is confusing about my explanation, please ask it.
Thanks, Tibor