Are Ajax requests available in IE 5.5 / Win 98? Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
As far as I know, all the way back to 5.0. Prototype, however, doesn''t work in 5.0, but does work in 5.5 when things like array.push() and for...in were added (odd that such basic language features were missing from 5.0). Greg ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Sam Sent: Thursday, June 22, 2006 9:46 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Ajax in IE 5.5 / Win 98 Are Ajax requests available in IE 5.5 / Win 98? Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> As far as I know, all the way back to 5.0. Prototype, however, doesn''twork in 5.0, but does work in 5.5 when things like array.push() and for.in were added (odd that such basic language features were missing from 5.0). I''m getting an Ajax error loading a URL. I don''t have much diagnostic code... ;-) loadPageError: function(request) { alert(''An error occurred loading the URL: '' + this.URL); }, Does the parameter (request) or the "this" object hold error information that I can alert? Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
My earlier question wasn''t stated well... I get an Ajax onFailure error in IE 5.5/Windows 98 only. Here''s the request... new Ajax.Request ( sUrl { method: ''get'', parameters: '''', onFailure: this.loadPageError.bind(this), onComplete: this.loadPageFinish.bind(this), onException: this.loadPageException.bind(this) }); Looking at prototype.js, the success / failure routines are called with parameters: onSuccess(transport, json) OR onFailure(transport, json) The parameter transport is confusingly referred to as "request" in most software I''ve seen using prototype.js, but transport does return transport.status, which has a value of 501 in IE 5.5. Using Google, "XMLHTTP 501", I found this thread http://www.html.com/forums/javascript/10018-ajax-problem-501-not-implemented .html which goes into a lot of other detail on this error but suggests the server is responding 501 because it receives a "get" not a "GET". Now maybe Windows 98 should make this case-correction of get to GET, but I simply changed my call (shown above) to method: "GET" and IE 5.5 / Win98 is working fine now. Seems to me that this is a rare error, but prototype.js would be a better place for this fix... especially since line 674: if (this.options.method == ''get'' && parameters.length > 0) will fail if the user passes "GET". Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I think the fix for Ajax 501 error in prototype.js would be to force the method to upper case on the transport.open line 679 this.transport.open(this.options.method.toUpperCase(), this.url, Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
That would definitely do it. Send a bug report to Sam, who maintains prototype. He''s never replied to my bugs in the past, but most of them eventually got fixed. Should probably also fix that line where it looks for ''get'' to compare in lower case, while you''re at it. That way it''ll accept any case and send it on correctly. if (this.options.method.toLowerCase() == ''get'') ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Sam Sent: Thursday, June 22, 2006 1:20 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Ajax in IE 5.5 / Win 98 I think the fix for Ajax 501 error in prototype.js would be to force the method to upper case on the transport.open line 679 this.transport.open(this.options.method.toUpperCase(), this.url, Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I don''t have any idea how to log a bug report so if anyone here would do it that would be fine with me. Sam -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Thursday, June 22, 2006 3:26 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Ajax in IE 5.5 / Win 98 That would definitely do it. Send a bug report to Sam, who maintains prototype. He''s never replied to my bugs in the past, but most of them eventually got fixed. Should probably also fix that line where it looks for ''get'' to compare in lower case, while you''re at it. That way it''ll accept any case and send it on correctly. if (this.options.method.toLowerCase() == ''get'') _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Sam Sent: Thursday, June 22, 2006 1:20 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] Ajax in IE 5.5 / Win 98 I think the fix for Ajax 501 error in prototype.js would be to force the method to upper case on the transport.open line 679 this.transport.open(this.options.method.toUpperCase(), this.url, Sam _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
On 6/22/06, Sam <sam.google-Uc2IQQBAS6sAvxtiuMwx3w@public.gmane.org> wrote:> I don''t have any idea how to log a bug report so if anyone here would do it > that would be fine with me.I''d encourage you to learn. It''s good for the soul. And it tastes great. AND it''s less filling. http://dev.rubyonrails.org/ Like Gregory said though; Sam (the maintainer) isn''t very responsive to his users / contributors. Sad. Todd