What I would really prefer in my case is for a way to specify the JSON data
inside within the HTML file without calling an external file.
Something like this except what would I use instead of "link"?
<html>
<head>
<title>MIT Nobel Prize Winners</title>
<link type="application/json" rel="exhibit/data"
Data= {"items" : [
{type : "Nobelist",
label : "Burton Richter",
discipline : "Physics",
shared : "yes",
"last-name" : "Richter",
"nobel-year" : "1976",
.....
} ] }
/>
<script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js"
type="text/javascript"></script>
etc
> This is a limitation imposed by all browsers. Using XmlHttpRequest, a
> web page can only load data from the same domain. There is a way to
> overcome that limitation using JSONP which involves a web server, but at
> the moment Exhibit does not use that "hack" for JSON data files.
>
> David
>
> Bruce Robertson wrote:
>> Trying to use the nobelists example locally for testing.
>>
>> Copied the source of nobelists.html and have a local copy of nobelists.js
>>
>> If I change the link to a full URL it fails
>>
>> This works OK:
>>
>> <html>
>> <head>
>> <title>MIT Nobel Prize Winners</title>
>> <link href="nobelists.js" type="application/json" rel="exhibit/data" />
>> <script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js"
>> type="text/javascript"></script>
>> etc
>>
>> Fails:
>>
>> <html>
>> <head>
>> <title>MIT Nobel Prize Winners</title>
>> <link href="http://simile.mit.edu/exhibit/examples/nobelists/nobelists.js"
>> type="application/json" rel="exhibit/data" />
>> <script src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js"
>> type="text/javascript"></script>
>> etc
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://simile.mit.edu/mailman/listinfo/general
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general