Norman Gray wrote:
> Greetings.
>
> I'm trying to add events to a timeline, but not seeing the results
> I'd expect.
>
> I have a timeline on a page, along with a simple interface which
> posts user-entered information about a new event to a server, and
> gets back a JSON string representing that new event. The server-side
> stuff works OK, and if I reload the timeline, I see the new event
> added to the event list. But I want to see the new event in the
> timeline immediately, as visual feedback (deferred gratification be
> damned!).
>
> I'm following the example described in [1], using loadJSON(eval
> ("("+xxx+")"), where xxx is the JSON returned by the server,
> representing the new event:
>
> eventSource.loadJSON(eval("("+http_request.responseText+")"), url);
>
> where http_request.responseText = { "event"
Hi Norman, maybe "event" should be "events"?...
David
> : [ { "start" :
> "2006-12-21T22:16:00Z", "title" : "newtag", "link" : "http://
> nowhere.org", "description" : "newtag", } ], "dateTimeFormat" :
> "iso8601" }
>
> That seems to work, inasmuch as I've now stopped it producin
> Javascript errors. Should I expect to see the new event in the
> timeline?
>
> I've also tried calling the band layout(), paint() and softPaint()
> methods immediately after this, but they don't seem to do the magic.
>
> I'm no Javascript expert (all I know of Javascript I've learned from
> reading the Timeline code[2]). Am I missing something obvious?
> Googling the mailing list, I see a couple of mentions of the above
> recipe, suggesting that I'm doing something everyone else knows you
> can't. Hmm.
>
> Thanks for any pointers.
>
> Best wishes,
>
> Norman
>
>
> [1] http://simile.mit.edu/mail/ReadMsg?listName=General&msgId=9768
> [2] ...and having read that it's scheme-like; bah: why couldn't it
> just _be_ scheme!?
>
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general