Hi all,

When hosting timeline 2.2.0 locally and modifying the timeline-api.js
as per
http://simile-widgets.googlecode.com/svn/timeline/tags/2.2.0/src/webapp/api/timeline-api.js

I am getting the error "run time error", and when debugging it points
to the timeline.js script. In particular this section of the band
object:



this._locale = ("locale" in bandInfo) ? bandInfo.locale :
Timeline.getDefaultLocale();
    this._timeZone = ("timeZone" in bandInfo) ? bandInfo.timeZone : 0;
    this._labeller = ("labeller" in bandInfo) ? bandInfo.labeller :
        (("createLabeller" in timeline.getUnit()) ?
            timeline.getUnit().createLabeller(this._locale,
this._timeZone) :
            new Timeline.GregorianDateLabeller(this._locale,
this._timeZone));


I am trying to debug at the moment.
Has anyone else had this problem? I thought that timeline 2.2.0 would
be compatible with IE.

i'm stuck on this on and i need it to work with IE otherwise half of
our users won't be able to see the timeline. I'll post a solution if i
get it. Any ideas why it wont work?

Paul



My test code is as follows

-------------------------------html code ----------------------------

<html>
         <head>
                <script type="text/javascript" 
src="timelineFiles/src/webapp/api/
timeline-api.js"></script>
                <script type="text/javascript" src="testFunctions.js"></script>
         </head>

        <body onload="initTimeline();" onresize="onResize();">
                <div id="my-timeline" style="height: 650px; width:1050px; 
border:
1px solid black"></div>
        </body>

</html>



-------------------------testFunctions.js--------------------------


function initTimeline() {


        var theme = Timeline.ClassicTheme.create();
        theme.ether.interval.marker.hAlign = "Top";
          theme.ether.backgroundColors = [
                "#D7D1BF",
                "#D9D3C9",
                "#FFFFFF",

            ];





var eventSource = new Timeline.DefaultEventSource();

  //Generate 50 random events up to 20 days in the past or the future
  for(var i=0;i<50;i++) {

      dateEvent = new Date();
      dateEvent.setTime(dateEvent.getTime() +
((Math.floor(Math.random()*41) - 20) * 24 * 60 * 60 * 1000));



        var myhash = new Object();

                  myhash.id = i.toString();
                      myhash.start = dateEvent;
                      myhash.instant = true;
                      myhash.text = i;
                      myhash.description = "Description for Event: " + i;


              var evt = new Timeline.DefaultEventSource.Event(myhash);

              eventSource.add(evt);


}

  // Initialise the timeline bands, and set the zoom values
   bandInfos = [

                           Timeline.createBandInfo({

                                eventSource:    eventSource,
                                date:           dateEvent,
                                width:          "05%",
                                intervalUnit:   Timeline.DateTime.DECADE,
                                intervalPixels: 100,
                                overview:               true,
                                theme:                  theme
                            }),


                         Timeline.createBandInfo({

                                trackHeight:    0.4,
                                showEventText:  false,
                                eventSource:    eventSource,
                                date:           dateEvent,
                                width:          "04%",
                                intervalUnit:   Timeline.DateTime.YEAR,
                                intervalPixels: 250,
                                overview:               true,
                                theme:                  theme
                            }),

                                Timeline.createBandInfo({

                                        eventSource:    eventSource,
                                date:           dateEvent,
                                width:          "91%",
                                intervalUnit:   Timeline.DateTime.MONTH,
                                intervalPixels: 50,
                                theme:                  theme,
                                zoomIndex:      10,
                        zoomSteps:      new Array(
                              {pixelsPerInterval: 300,  unit:
Timeline.DateTime.DAY},
                              {pixelsPerInterval: 250,  unit:
Timeline.DateTime.DAY},
                              {pixelsPerInterval: 200,  unit:
Timeline.DateTime.DAY},
                              {pixelsPerInterval: 150,  unit:
Timeline.DateTime.DAY},
                              {pixelsPerInterval: 100,  unit:
Timeline.DateTime.DAY},
                              {pixelsPerInterval: 50,  unit: 
Timeline.DateTime.DAY},
                              {pixelsPerInterval: 600,  unit:
Timeline.DateTime.MONTH},
                              {pixelsPerInterval: 500,  unit:
Timeline.DateTime.MONTH},
                              {pixelsPerInterval: 400,  unit:
Timeline.DateTime.MONTH},
                              {pixelsPerInterval: 200,  unit:
Timeline.DateTime.MONTH},
                              {pixelsPerInterval: 100,  unit:
Timeline.DateTime.MONTH},
                              {pixelsPerInterval: 50,  unit:
Timeline.DateTime.MONTH} // DEFAULT zoomIndex
                            )}),
                          ]

  bandInfos[0].syncWith = 2;
  bandInfos[0].highlight = true;
  bandInfos[1].syncWith = 2;
  bandInfos[1].highlight = true;
  bandInfos[2].highlight = true;

  tl = Timeline.create(document.getElementById("my-timeline"),
bandInfos, Timeline.HORIZONTAL);
  tl.paint();

}





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to