Erez,
Instead of
parseDateTimeFunction("Feb 09 2008 19:50:00 GMT")
Try either
new Date(2008, 1, 9, 17, 50, 0)
or
Timeline.DateTime.parseGregorianDateTime("2008-02-09T19:50:00Z")
David
Erez Boym wrote:
> Hi,
>
> I'm trying to create events from an external function. I have an input source
> which is not natively supported by TimeLine and I need to manually add events
> to the TimeLine.
>
> I have tried to mimic the procedure in the XML input source:
>
> var evt = new myTimeLine.DefaultEventSource.Event(
> parseDateTimeFunction("Feb 09 2008 19:50:00 GMT"),
> parseDateTimeFunction("Feb 11 2008 17:20:00 GMT"),
> parseDateTimeFunction(null),
> parseDateTimeFunction(null),
> "true",
> "Event title",
> "Event Description",
> null,
> null,
> null,
> null,
> null
> );
> myTimeLine._events.add(evt);
>
> And the examples I had found on the archives:
> myTimeLine.getBand(0).eventSource.loadJSON({
> 'events' : [
> {
> 'start' : $json_encode("Feb 09 2008 19:50:00 GMT"),
> 'end' : $json_encode("Feb 11 2008 17:20:00 GMT"),
> 'title' : $json_encode("Title"),
> 'link' : $json_encode(""),
> 'description' : $json_encode("Description"),
> },
> ],
> 'dateTimeFormat': 'iso8601'
> }, "http://$PAGE_USERID.$IHOST"
> );
>
> but all I getting is an err saying: TypeError: Undefined value
>
> What will be a correct syntax to add en event using an external function (A
> non JSON syntax is preferable) ?
>
> Thanks
>
> Erez
>
>
>
>
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general