I have a HTML section that builds a variable containing this:
<div id='calendar'></div>
<script>
var mevent = "{id: 1,title: 'Jan',start: '2016-07-10T10:45',end: '2016-07-10T11:15'},{id: 2,title: 'Gert',start: '2016-07-26T06:00',end: '2016-07-26T22:00'},{id: 7,title: 'Piet',start: '2016-07-10T08:00',end: '2016-07-10T09:00'}"
</script>
Then the java section, containing this:
<script>
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
selectable: true,
selectHelper: true,
defaultView: 'month',
eventRender: function(event, element, view) {
retu $('<div>' + event.title + '</div>');
},
events: [mevent]
});
//function event() {retu mevent;}
//document.getElementById("calendar").ierHTML = event();
</script>
Using the getElementById displays the data correctly, but using it as variable inside the calendar shows nothing, unless pasted into the events section as displayed by using getElementById.
What would the syntax be to use the variable inside the calendar script? Thanks...
