Hello,
I'm playing about a bit with something that would be nice in an auto-updating webpage. It'd autoupdate via AJAX, polling data from a place on lfsworld every x seconds.
This works when I put both the JavaScript (the webpage) and the data source (a php script that outputs data) on lfsworld.
It doesn't work when I put the JavaScript on another host and then try to AJAX the data from lfsworld.
I know this is a security feature of JS, but would there be a way around it?
The idea is : the data source outputs race progress data from a host. You can make a nice race progress view with that (data includes host details and racer details like car, lapcount, but also all split and lap times).
As such, you can create a nice auto-updating host-info view on your webpage or so and it works for any licensed host. Since auto-updating is usually done with JS, but since you cannot use an 'outside source' to load from with AJAX, i wonder if the mentioned functionality can still be achieved?
EDIT - oh yeah, one way would be to use an intermediate url for AJAX, where AJAX polls a (php) script on the original host that in turn fetches the data from lfs world. But that requires additional work for people. Ideally people should only have to add a javascript include into their html and add a <div> with a certain id.
EDIT2 - oh yeah again, another way is that i could place a html page on lfsworld that people could put into an iframe on their own website. But this still isn't a total 'freedom' solution where you could make your own race progress view. In this case, using my html page on lfsworld would be the only option.
I'm playing about a bit with something that would be nice in an auto-updating webpage. It'd autoupdate via AJAX, polling data from a place on lfsworld every x seconds.
This works when I put both the JavaScript (the webpage) and the data source (a php script that outputs data) on lfsworld.
It doesn't work when I put the JavaScript on another host and then try to AJAX the data from lfsworld.
I know this is a security feature of JS, but would there be a way around it?
The idea is : the data source outputs race progress data from a host. You can make a nice race progress view with that (data includes host details and racer details like car, lapcount, but also all split and lap times).
As such, you can create a nice auto-updating host-info view on your webpage or so and it works for any licensed host. Since auto-updating is usually done with JS, but since you cannot use an 'outside source' to load from with AJAX, i wonder if the mentioned functionality can still be achieved?
EDIT - oh yeah, one way would be to use an intermediate url for AJAX, where AJAX polls a (php) script on the original host that in turn fetches the data from lfs world. But that requires additional work for people. Ideally people should only have to add a javascript include into their html and add a <div> with a certain id.
EDIT2 - oh yeah again, another way is that i could place a html page on lfsworld that people could put into an iframe on their own website. But this still isn't a total 'freedom' solution where you could make your own race progress view. In this case, using my html page on lfsworld would be the only option.