Hi David, Thank you kindly for your response.
The xml file for the event and text files for the Timeplots are on the same server/domain, so that's not the issue. Meanwhile I have resolved the issue, so am posting it in case anyone else hits it. The symptom: Timeplot is working happily with one or many separate eventSources. However, as soon as I attempt to add an XML event to get a timeline overlay, Firebug reports the following: Caught exception: undefined Details: TypeError: event.getTime is not a function (It doesn't provide other details e.g., file name or line number provided) The cause: Long story, short, I had defined a bunch of placeholder eventSources and some logic that would load them with data if and only if a matching data sources were provided via uri arguments e.g., http://myurl?data1=plotdata1.txt&data3=plotdata3.txt ...would invoke logic to load timeplot eventSource1 and eventSource3 The strategy of adding extra eventSources and conditionally populating them seems to work. Timeplot doesn't complain about the "unloaded" eventSources. However, when a timeline event is loaded to the same timeplot object e.g., timeplot.loadXML(datafile2, eventSource2); ...it breaks. I'm pretty sure this is because timeline tries to figure out things like the minimum and maximum axis values. When it does so, it encounters null objects from unloaded eventSource objects e.g., minValue, and just dies with a small whimper ("event.getTime is not a function"). The error gets thrown all the way out to ajax .. xmlhttp.js .. _onReadyStateChange (sorry if this notation is wrong) with no clue as its origin. The resolution: Once the unused eventSources were removed from the html, everything worked. Thanks again for your note - I really appreciate your thoughtfulness. Yours in babbling insanity and 1,000 alert()s, - Pat On Sat, Mar 28, 2009 at 5:04 PM, David Huynh <[email protected]> wrote: > > Pat, > > Is the xml doc on a different domain than the html file? In which case, > it's not possible to use xml http requests to load it. Otherwise, if you > could give us a URL to the html so it's easier to debug. > > David > > pat wrote: > > Greetings, > > > > Sorry in advance for the potentially dumb question ... however, if > > anyone could point me in the direction of a solution, I'd be more than > > grateful. > > > > I have implemented a local deployment of timeplot behind an Apache > > server (which works) and now am attempting to overlay timeline events. > > > > I'm passing a very simple example (a modified "example1.xml" from the > > docs, reproduced below). It fails w/ the beautifully-cryptic "Error > > handling onReadyStateChange". > > > > Using a series of alert statements, I find this info in the response > > object: > > > > xmlhttp.getResponseHeader("Content-Type") : application/xml > > responseXML : [object XMLDocument] > > status : 200 > > > > ... and the error caught is "event.getTime is not a function". > > > > So we evidently don't have the xml DOM object expected because we're > > not parsing out the events properly (or so I'm thinking). > > > > I've begun parsing the rest of the responseXML object, and am finding > > about what I'd expect - a nested series of Text and Element nodes - > > but truthfully, I'm not sure what the parse tree needs to look like. > > > > I expect I'm missing something as big as a 2x4 while looking for > > sawdust - and if anyone could point it out, I'd be very grateful. > > > > Best Regards > > > > - Pat > > > > > > ***** (excerpted) timeplot embedded javaascript file ***** > > > > > > <!--Get the timeplot api from the local repository --> > > <script type = "text/javascript" language = "javascript" > > src = "/timeplot/api/1.0/timeplot-api.js?local"> > > </script> > > > > <!--Instansiates the timeplot objects on page load --> > > <script type = "text/javascript"> > > function onLoad() { > > var timeplot; > > var eventSource5 = new Timeplot.DefaultEventSource(); > > > > var timeGeometry = new Timeplot.DefaultTimeGeometry({ > > gridColor: new Timeplot.Color("#000000"), > > axisLabelsPlacement: "bottom" > > }); > > > > var plotInfo = [ > > Timeplot.createPlotInfo({ > > id: "plot5", > > eventSource: eventSource5, > > timeGeometry: timeGeometry, > > lineColor: "#D0A825" > > }) > > > > events = EVENTDIR + "example.xml"; > > timeplot.loadXML(events, eventSource5); > > > > > > > > ******** the xml file ********* > > > > <data> > > <event > > start="May 28 2008 09:00:00 GMT" > > end="Jun 15 2008 09:00:00 GMT" > > isDuration="true" > > title="Writing Timeline documentation" > > image="http://simile.mit.edu/images/csail-logo.gif" > > > > > A few days to write some documentation for <a href="http:// > > simile.mit.edu/timeline/">Timeline</a>. > > </event> > > > > <event > > start="Jun 16 2008 00:00:00 GMT" > > end="Jun 26 2008 00:00:00 GMT" > > title="Friend's wedding" > > > > > I'm not sure precisely when my friend's wedding is. > > </event> > > > > <event > > start="Aug 02 2008 00:00:00 GMT" > > title="Trip to Beijing" > > link="http://travel.yahoo.com/" > > > > > Woohoo! > > </event> > > > > > > > > > > > > -- Patrick J. Barton --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
