Sounds to me like it is cacheing the xml, especially if you are using IE.
Try appending a random number to your url after each modification of the
data source.

yourdatasource.xml+randomNum();

function randomNum()
{
    return "?rnd=" + Math.floor(Math.random() * 2000);
}


HTH.


On 8/18/07, Naimesh (Hotmail) <[EMAIL PROTECTED]> wrote:
>
>  Dear Sir,
>
>
>
> Hello ! I am new to timeline. I want to know to refresh my timeline. I
> added following code to populate time line and the xml mentioned is getting
> changed – an event is added successfully on the xml file but does not get
> populated on the timeline, until I close the browser and open it again. I
> tried calling paint but does not work I have called this fn on
>
> Onload of the body tag for this page
>
>
>
>
>
> <script language="JavaScript">
>
>   var tl;
>
>   function onLoad() {
>
>     var eventSource = new Timeline.DefaultEventSource();
>
>     var bandInfos = [
>
>     Timeline.createBandInfo({
>
>         eventSource:    eventSource,
>
>         date:           "Jun 28 2007 00:00:00 GMT",
>
>         width:          "70%",
>
>         intervalUnit:   Timeline.DateTime.MONTH,
>
>         intervalPixels: 100
>
>     }),
>
>     Timeline.createBandInfo({
>
>         showEventText:  false,
>
>                 trackHeight:    0.5,
>
>         trackGap:       0.2,
>
>         eventSource:    eventSource,
>
>         date:           "Jun 28 2007 00:00:00 GMT",
>
>         width:          "30%",
>
>         intervalUnit:   Timeline.DateTime.YEAR,
>
>         intervalPixels: 200
>
>     })
>
>   ];
>
> fpath = '<?php echo "$xmlpath";?>';
>
> //alert(t2);
>
>   bandInfos[1].syncWith = 0;
>
>   bandInfos[1].highlight = true;
>
>   tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
>
>   Timeline.loadXML(fpath, function(xml, url) { eventSource.loadXML(xml,
> url); });
>
>   alert("Hi !");
>
>   timeline.paint();
>
>  }
>
>
>
>  var resizeTimerID = null;
>
>  function onResize() {
>
>     if (resizeTimerID == null) {
>
>         resizeTimerID = window.setTimeout(function() {
>
>             resizeTimerID = null;
>
>             tl.layout();
>
>         }, 500);
>
>     }
>
>  }
>
> </script>
>
>
>
> This is how it is called
>
>
>
> <body onLoad="onLoad();search_toggle();" onResize="onResize();">
>
>
>
> When the pages is first loaded it shows all time line but does not when an
> even is added and page is re-opened until the browser window is closed and
> opened a new and this page is opened.
>
>
>
> Please help soon on above.
>
>
>
> Thanks & Regards.
>
>
>
> Naimesh Trivedi
>
> [EMAIL PROTECTED]
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to