fwahlqvist / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE: How to do cross-domain scripting with Timeline? #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a JSON source outside the server (e.g. http://someurl/createjson)
2. Timeline.loadJSON("http://csomeurl/createjson", function(xml, url) {
eventSource.loadJSON(xml, url); });
3.

What is the expected output? What do you see instead?
Expected: Data from the configured server
Actual: I get a exception, caused by the security functionality in
XMLHttpRequest class.
  - uncaught exception: Permission denied to call method XMLHttpRequest.open

What version of the product are you using? On what operating system?
Latest version in simile http://simile.mit.edu/timeline/api/timeline-api.js
OS: Windows
Browser: Mozilla Firefox 2.0.0.6

Please provide any additional information below.
I am trying to create a timeline from several different JSON data sources
in different webservers. 

Original issue reported on code.google.com by teemu.ry...@gmail.com on 27 Sep 2008 at 3:51

GoogleCodeExporter commented 9 years ago
I just realized that this actually might be impossible to solve in javascript..
http://www.captain.at/howto-ajax-permission-denied-xmlhttprequest.php

Original comment by teemu.ry...@gmail.com on 27 Sep 2008 at 4:02

GoogleCodeExporter commented 9 years ago
Hi,

Yes, cross-domain loading is not supported due to browser restrictions.

You can work-around the issue in various ways, main one that I know of is to 
have a 
script on your server (not browser) which will pull from the other server. 
Google for 
cross-domain scripting to find other solutions. Thanks for using Timeline.

Original comment by larryklu...@gmail.com on 28 Sep 2008 at 12:52