If you have a chance to do the experiment, it would be nice to know if
google indexes your data inside the script tags. I am guessing not.
It would also be a nice addition to exhibit to allow what you've done
(specification of data inline) to happen without deactivating the
autocreate---ie, to have the autocreating exhibit check for a predefined
items variable in addition to loading data files. I guess one way would
be to embed the data definition in an "internal callback"---
function Items() {
var myData = { "items" : .... json stuff here };
return myData
}
Then have exhibit call the Items() function if it is defined. This
could combine with loading data from elsewhere.
Eric wrote:
> Thanks, interesting stuff. I was able to find an example of how to
> use inline javascript from an older post in this group actually;
> basically
>
> 1) Load in the exhibit script appending the "autoCreate=false"
> parameter, i.e.:
>
> <script type="text/javascript" src="http://static.simile.mit.edu/
> exhibit/api-2.0/exhibit-api.js?autoCreate=false"></script>
>
> 2) Then, in an onLoad handler, do this:
>
> var myData = { "items" : .... json stuff here };
>
> window.database = Exhibit.Database.create();
> window.database.loadData(myData);
> window.exhibit = Exhibit.create();
> window.exhibit.configureFromDOM();
>
>
> On Sep 16, 12:25 pm, "David R. Karger" <[EMAIL PROTECTED]> wrote:
>
>> I'm not sure whether embedding javascript data possible, but Johan
>> Sundstrom demoed placing the data inside an html TABLE in the main
>> page:http://ecmanaut.googlepages.com/choir-events.html
>> I've always thought this is a really great idea, as it completely solves
>> the problem of non-js browsers and also of google indexing the exhibits.
>>
>> Although it worked well in the past, it appears not to be running at the
>> moment. But if you look in the source you can see all the exhibit bits
>> are still there. I'm not sure what Johan's plans for it are.
>>
>> -David
>>
>>
>>
>> Eric wrote:
>>
>>> Is it possible to add/load data sets "directly" (i.e. rather than a
>>> separate linked JSON file or other source)? Instead of having for
>>> example:
>>>
>>> <link href="nobelists.js" type="application/json" rel="exhibit/data"/>
>>>
>>> I would like to be able to do something along the lines of:
>>>
>>> <script>
>>> var data = { "items" : [ { label : "Burton Richter",
>>> discipline : "Physics",
>>> shared : "yes",
>>> } ] };
>>>
>>> Exhibit.load(data);
>>> </script>- Hide quoted text -
>>>
>> - Show quoted text -
>>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---