Allora quando sono on line non trova il file XML, perchè??
codice:
getEvents.onLoad = function (success) {
if (success){
// calendar_array will hold the calendar data that has been loaded
var calendar_array = new Array();
var minStartDate = this.firstChild.attributes.startDate.parseDate();
var maxEndDate = this.firstChild.attributes.endDate.parseDate();
// minStartDate and maxEndDate are used to set the displayRange
calendar_ec. setDisplayRange({begin:minStartDate,end:
maxEndDate});
// loop over the event nodes in the xml
// and stores the record as an object inside calendar_array
var qNodes = this.firstChild.childNodes;
for (var q=0; q<qNodes.length; q++) {
var d = qNodes[q].attributes;
calendar_array.push({title:d.title,description:d.description,startDate:d.startDate.parseDate(),endDate:d.endDate.parseDate(),allDay:Boolean(d.allDay),eventType:d.eventType,pattern:qNodes[q].firstChild});
}
// passo l' array del calendario
calendar_ec.setDataProvider(calendar_array);
// show the calendar now it is ready
calendar_ec._visible = true;
// simulo il click su ogni giorno del calendario
calendar_ec.getDayByDate(new Date().getDate()).onRelease();
}else{
events_txt.htmlText = "non trvo il file XML"
}
}
// Carico il file XML
getEvents.load("calendario.xml");
in fatti non lo trova, ma è su, come mai? Cosa puo' essere? Servono diritti particolari o robe simili per leggere on line un file XML??