AJAX without Rails

So, for example, looking at the examples on the JQuery website. When I
look at the source or any of the example page demos, which as I
understand it is using AJAX, I don't see any call to an external script.

Then you haven't actually found any AJAX examples. JQuery is a
library of functions, not all of which have anything to do with AJAX.

It appears it is handling things locally, perhaps sending the request to
the "local" AJAX server, but not a a server script (say cgi) and the
script sending a request back to the AJAX server on the client.

There is no "local" or "client" AJAX server. There's the client where
the JS is running, and the server the page was loaded from, which
can also serve AJAX requests.

I don't use JQuery, but there's gotta be some examples there :slight_smile:

···

On Tue, Mar 18, 2008 at 3:02 PM, Tony De <tonydema@gmail.com> wrote:
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

Hassan Schroeder wrote:

···

On Tue, Mar 18, 2008 at 3:02 PM, Tony De <tonydema@gmail.com> wrote:

So, for example, looking at the examples on the JQuery website. When I
look at the source or any of the example page demos, which as I
understand it is using AJAX, I don't see any call to an external script.

Then you haven't actually found any AJAX examples. JQuery is a
library of functions, not all of which have anything to do with AJAX.

It appears it is handling things locally, perhaps sending the request to
the "local" AJAX server, but not a a server script (say cgi) and the
script sending a request back to the AJAX server on the client.

There is no "local" or "client" AJAX server. There's the client where
the JS is running, and the server the page was loaded from, which
can also serve AJAX requests.

I don't use JQuery, but there's gotta be some examples there :slight_smile:

Thanks Hassan, I'll keep searching...

tonyd
--
Posted via http://www.ruby-forum.com/\.

Tony De wrote:

Hassan Schroeder wrote:

I don't use JQuery, but there's gotta be some examples there :slight_smile:

Thanks Hassan, I'll keep searching...

You should dig up a tutorial on the XmlHttpRequest object.

It is not the only way to do this sort of thing, but is likely the most common. It's not complicated.

Basically, some javascript running in the browser makes a request of a URL. What gets returned from the server is (typically) used to alter the browser DOM.

There are, I believe, some examples of this shipped with the Ramaze source code.

···

--
James Britt

"Judge a man by his questions, rather than his answers."
  - Voltaire

Have to agree with the one writing about some replies ago, in that
Michael Neumann's example is very beautiful IMO.

···

--
Posted via http://www.ruby-forum.com/.

# www.ramaze.net

ah, the mention of that humble big little framework called ramaze makes me smile; lightweight, open, multiple engines, helpers, templates, and very rubyish, even rubyish than ruby's webrick, imho. ruby amaze-ing indeed :slight_smile:

kind regards -botp

···

From: James Britt [mailto:james.britt@gmail.com]