Wow glad to see that I'm not crazy =)
I don't really know if I want to create such a lengthy workaround in
my application for Opera. I like the browsers but lets face it,
almost no one uses it and if is not supporting Ajax properly then
there isn't much i am willing to do. I submitted a bug report to
Opera but i think a lot of people are under the impressions that its a
implementation issue due to some kind of browser checking in the
code. I will leave that page on our servers in case you would like to
submit another more detailed bug report as you seem to know a bit more
about this than i do.
Thanks again for you help.
-Alex
On Feb 14, 2:09 pm, Colin Mollenhour <[EMAIL PROTECTED]>
wrote:
> Thank you for taking the time to post that test page. I haven't tested
> this in any older version of Opera but it seems to be that Opera is
> quite behind on their Ajax support. I couldn't find much info on it but
> this is definitely just an Opera limitation. I even hacked up the
> quirksmode Ajax functions and monitored every last detail of the
> XMLHttpRequest and Opera doesn't follow a lot of the specs.. for
> example, on asynch calls it completely skips the Receiving (3)
> readyState. I also tried Content-Type: text/xml and neither the
> responseText nor responseXML are given any useful values for anything
> but 200. There's nothing you can do about this other than write a patch
> for Opera and I have no idea where to start there..
>
> However, a completely viable option would be to use a custom header. I
> tested this and Opera does set them and retrieve them correctly for all
> response statuses. You could use Prototype's current JSON convention or
> make up your own...
> PHP:
> header('X-JSON: ({"key":"Your value"})'); //Prototype already supports this
> header('X-responseText: Some text here'); //make sure this is escape
> properly if necessary
>
> Javascript:
> onFailure: function(transport, json){
> alert(json.key); //"Your value"
> var responseText = (transport.responseText ? transport.responseText
> : transport.getResponseHeader('X-responseText'));
> alert(responseText);
>
> }
>
> There is nothing Prototype can do about this and I don't warrant any
> such hacks be implemented, I think you'll just have to live with it
> until Opera gets their XMLHttpRequest support complete. I recommend the
> JSON approach as PHP has a nice json_encode and Prototype already
> supports it, all of your encoding will be handled for you.
>
> Colin
>
> [EMAIL PROTECTED] wrote:
> > Here is a sample... note it works fine with every browsers except
> > opera on non 200 responses. Php code is included in the pre tag.
>
> >http://titan.clunet.edu/test.php
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---