Friday 22 June 2007 9:43:44 am
Dears I am planing to use an AJAXy gadget called timeline from (http://simile.mit.edu/timeline/ ). This gadget requires reading an xml file to generate the timeline. How can I make ez publish generate an xml file for the timeline to read. see the bold line below shows how the Javascript reads the xml file <b>Timeline.loadXML("/design/ar/javascript/ks-ksa.xml", function(xml, url) { eventSource.loadXML(xml, url); });</b>
var tl;
function onLoad() {
var eventSource = new Timeline.DefaultEventSource(0);
var theme = Timeline.ClassicTheme.create();
theme.event.bubble.width = 320;
theme.event.bubble.height = 220;
var d = Timeline.DateTime.parseGregorianDateTime("2000")
var bandInfos = [
Timeline.createBandInfo({
width: "100%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 200,
eventSource: eventSource,
date: d,
theme: theme
})
];
tl = Timeline.create(document.getElementById("kstl"), bandInfos, Timeline.HORIZONTAL);
Timeline.loadXML("/design/ar/javascript/ks-ksa.xml", function(xml, url) { eventSource.loadXML(xml, url); });
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
|