There has been a lot of progress lately in getting javascript to talk
to a server.
In the past projects such as JSRS
(
http://sourceforge.net/projects/js-rs) were helpful by providing a
cross browser solution to contacting a server and retrieving info
through javascript. I've found it very useful, and it's a good
starting point.
JSRS Abstract:
JavaScript Remote Scripting Transfer Javascript data without reloading
the webpage. Call functions or methods on the server through
Javascript. Works without the use of any Java nor plugins. Supports
NS6.2, IE5.5 and up. Parameters passing is wrapped.
Another great solution, but it's not completely browser independent, is
the XMLHTTPRequest object. This has become more popular for a lot of
reasons. It's easier to use, implements XML to relay data, and it is
supported by most browsers (not opera or konquerer that I know of).
However, the XMLHTTPRequest object is becoming more standard and
accepted (opera will support it in version 8.0)
One of the reasons why this has started to become more popular, believe
it or not, is that Google is starting to use it in their online apps.
Gmail (
http://www.gmail.com), Google suggest
(
http://www.google.com/webhp?complete=1&hl=en), and Google
Maps(
http://maps.google.com) use it as core function. It's some pretty
cool stuff.
The XMLHTTTP object is designed to be given a url and callback
function. Then once the call to the server is made and a response is
retrieved by the browser the callback function is executed. I've found
a few good sites that go into detail and have some good examples.
http://webfx.eae.net/dhtml/xmlextras/xmlextras.html http://www.adaptivepath.com/publicat...ves/000385.php http://jibbering.com/2002/4/httprequest.html
One more solution that may be worth looking into is the XML for
<script> open source project (
http://xmljs.sourceforge.net/). This
project was mainly developed to provide the XML Document Object Model
for javascript, but it has some other functionality that allows talk
back and forth to a server from within the javascript framework.
I prefer using a mix of the all three approaches in using javasccript
to get data from a server. I enjoy the XML Document Object Model that
is available with the XMLHTTP object, but I can't sacrifice the browser
compatibility support that JSRS affords. So nice mix works pretty
well.
I hope this is what you're looking for. I didn't post any code
snippets since the links I've given do a much better job.
I think this info should get you started.
Good Luck