Yes, the code on your server works for me. Though I didn't seem to me that it would make any difference, I had a quick thought that it might be that I was using the GET method rather than the POST method. However, changing the method had no effect.
I'm using Firebug to inspect the DOM, GET/POST request, and the response. When I get the response back, it's garbled. As long as I specify the content-type as 'text/javascript' (and set the evalJSON parm to 'force'), the responseJSON property is populated correctly. However, when I set the content-type to 'application/json', the response (i.e. responseText property) comes back garbled. It contains non-printable characters. It's quite strange. Here's a copy & paste of the response: �% ���������� [EMAIL PROTECTED] ������ z k% ������� z k% ������ z k % ���� z@ % �% We're running Apache on an IBM AS/400 machine, so our instance of Apache might not like the 'application/json' content type. Have you heard of this before? Can the Apache config file impact the content types the Apache Web Server is willing to serve up? Thanks! On Apr 14, 4:12 pm, Michael Stillwell <[EMAIL PROTECTED]> wrote: > That works fine for me; see: > > http://beebo.org/scratch/test.html > > which Ajax.Requests: > > http://beebo.org/scratch/test.php > > --M. > > On Apr 14, 9:53 pm, broberts <[EMAIL PROTECTED]> wrote: > > > { > > "response": { > > "status": "ok", > > "purpose": "user", > > "rtncod": "1234", > > "body": "It worked" > > } > > > } > > > On Apr 14, 3:13 pm, Michael Stillwell <[EMAIL PROTECTED]> > > wrote: > > > > On Apr 14, 6:35 pm, broberts <[EMAIL PROTECTED]> wrote: > > > > > In Firefox 2.x and IE6 (the browsers I've tested in thus far), the > > > > responseJSON property of the Ajax.Response object is null when I set > > > > the response content-type to "application/json". > > > > That should work. What's the exact JSON that's being returned from > > > the server? If it's a string it needs to be quoted: > > > > "Hello, World!" > > > > --M. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---