JS Remote Data Load

Started by MrCue, July 17, 2004, 09:40:05 AM

Previous topic - Next topic

MrCue

How do you load data from a remote site, like its done the in the "Live from smf" in the admin center?
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

MrCue

I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

[Unknown]

Sorry for taking so long to respond.

There are a few ways to do it, but only one really that works in Opera....

You just do something like:
<script type="text/javascript" src="http://www.remote-site.tld/script.js"></script>

IE and Mozilla support special extensions to load remote data, though, which I really like ;)... but Opera doesn't support them.

-[Unknown]

MrCue

What about if the user is unable to reach the remote domain?
how do you make it display different text?
or even attempt the load after the page has already loaded?
I am neither a Pessimist nor an Optimist, Just a Realist.

Eve-Online Forum | View Latest Eve-Online Kills | Site Map | SMF Installation

[Unknown]

Quote from: MrCue on August 04, 2004, 07:13:53 AM
What about if the user is unable to reach the remote domain?

Then it won't load, and whatever the script would have done won't be.

Quote from: MrCue on August 04, 2004, 07:13:53 AMhow do you make it display different text?
Check a variable the loading script takes, set variables before hand it can change, etc.

Quote from: MrCue on August 04, 2004, 07:13:53 AMor even attempt the load after the page has already loaded?

That would require the javascript I mentioned, and not work for Opera/Safari.

-[Unknown]

Advertisement: