Hi GChiu,

It is possible to include the data in the html file.
Just include it, then 

    eventSource.loadJSON(timeline_data, json_url); // load the events

where timeline_data is the event data.
json_url is the base url that should be used with the icon and wiki url 
references, if any, in the data.

But instead, I suggest that you simply point the Timeline library to a dynamic 
url that will return the json data.

In other words,  
            tl.loadJSON("data.js?"+ (new Date().getTime()), function(json, url) 
{
                eventSource.loadJSON(json, url);

where tl is the timeline object
and data.js is your dynamic program (not a file) that returns the json event 
data.
The (new Date().getTime()) part appends an ever-changing number to the url to 
ensure that the results will not be cached anywhere along the way.

The benefit is that it will enable you to separate the static html page and its 
use of Timeline from the dynamic data set.

Regards,

Larry




________________________________
From: gchiu <[email protected]>
To: SIMILE Widgets <[email protected]>
Sent: Saturday, December 27, 2008 1:50:47 PM
Subject: Newbie json question


I see that the examples show the data file as a separate file which is
loaded by the main html file.

Can the data be embedded instead into the html file ( eg. for exhibit
and timeline ) ?   I wish to do this as all my html is being generated
dynamically so I don't want any static data files lying around on the
webserver.

--~--~---------~--~----~------------~-------~--~----~
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