Hey Justin,

AJAX can only access contents from its originating domain (at least in 
most browsers), due to what is called the SOP (Same Origin Policy).  You 
can't access Google.de from anywhere but Google.de, and so forth.  This 
also means it won't work on a page accessed as a regular file 
(file://...), you'll have to go HTTP.

Just add this as the first line of your script, you'll see:

   Ajax.Responders.register({ onException: function(r, e) { alert(e) }});

You'll get an error message displayed when Ajax.Request tries to open 
the XHR connection.

What most developers do to circumvent this is implement a "proxy" URL on 
their originating domain, which simply forwards the call internally, and 
return the exact HTTP response (headers and body).

I believe IE had no such limitation, but apparently your code doesn't 
work in there either...  Maybe that's because you loaded it from a 
regular file:// URL?

-- 
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to