spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Jan-24 13:50 UTC
Prototype: Ajax.Request doesn''t work in Internet Explorer
Hi there I got a problem with Internet Explorer, I simply don''t find the answer. I got 2 files: ajax.html Contents: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ TR/html4/strict.dtd"> <html> <head> <Title>Ajax</Title> <script type="text/javascript" src="http://www.prototypejs.org/ assets/2007/11/6/prototype.js"></script> <script type="text/javascript" src="ajax.js"></script> </head> <body> </body> </html> ajax.js Contents: function sendData() { new Ajax.Request ("webret.php", { parameters: {}, method: ''get'', onFailure: function(request) { alert (''Failure''); }, onSuccess: function(request) { alert (''Success''); }, }); }; document.observe(''dom:loaded'' , function() { alert(''huhu''); }); This does work in Firefox (Firebug reporting no errors), but it doesn''t work in IE (I dont get the alert(''huhu'')). If I remove the function sendData() it works in IE. I''m not gettin what I''m doin wrong... The sendData() isn''t used anywhere. Either of u get a clue? Thx in advance --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Quadling
2008-Jan-24 14:09 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
How about changing alert(''huhu''); to sendData(); On 24/01/2008, spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > Hi there > > I got a problem with Internet Explorer, I simply don''t find the > answer. > > I got 2 files: > > ajax.html Contents: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/ > TR/html4/strict.dtd"> > <html> > <head> > <Title>Ajax</Title> > <script type="text/javascript" src="http://www.prototypejs.org/ > assets/2007/11/6/prototype.js"></script> > <script type="text/javascript" src="ajax.js"></script> > </head> > > <body> > </body> > </html> > > > ajax.js Contents: > > function sendData() { > new Ajax.Request ("webret.php", { > parameters: {}, > method: ''get'', > onFailure: function(request) { > alert (''Failure''); > }, > onSuccess: function(request) { > alert (''Success''); > }, > }); > }; > > document.observe(''dom:loaded'' , function() { > alert(''huhu''); > }); > > > This does work in Firefox (Firebug reporting no errors), but it > doesn''t work in IE (I dont get the alert(''huhu'')). If I remove the > function sendData() it works in IE. I''m not gettin what I''m doin > wrong... The sendData() isn''t used anywhere. > > Either of u get a clue? > > Thx in advance > > >-- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Jan-24 14:17 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
You are missing the point: I don''t wanna use sendData(), its just there. If sendData() is declared I dont get the alert, It''s like ajax.js isnt executed at all. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Quadling
2008-Jan-24 14:34 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
Try removing the trailing , after the close } for the onSuccess() callback. On 24/01/2008, spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > You are missing the point: > I don''t wanna use sendData(), its just there. > If sendData() is declared I dont get the alert, It''s like ajax.js isnt > executed at all. > > >-- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Jan-24 14:46 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
That''s it. Firebug didn''t show me this mistake, neither did IE. Is there a good IDE which shows such things, a free one by any chance. Thanks for the help, its always the little mistakes, that let u bang your head against the wall. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Quadling
2008-Jan-24 14:59 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
I don''t know if it is a bug per se. Just that FF doesn''t mind it and IE does. Put it back in. Do you get a little yellow triangle in the bottom left of IE? On 24/01/2008, spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > That''s it. Firebug didn''t show me this mistake, neither did IE. > Is there a good IDE which shows such things, a free one by any chance. > > Thanks for the help, its always the little mistakes, that let u bang > your head against the wall. > > >-- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
2008-Jan-24 15:20 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
No I don''t, IE just quits without a piep. Ultraedit and Aptana don''t help either. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Richard Quadling
2008-Jan-24 15:23 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
On 24/01/2008, spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <spike2050-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> > No I don''t, IE just quits without a piep. > Ultraedit and Aptana don''t help either.I think you''ll just have to be more careful in future! -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
dashifen
2008-Jan-24 19:09 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
That''s been my experience as well. Hanging commas just seem to cause problems for IE from which it (a) doesn''t recover and (b) doesn''t tell you about. - Dash - On Jan 24, 9:20 am, "spike2...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <spike2...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> No I don''t, IE just quits without a piep. > Ultraedit and Aptana don''t help either.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Justin Perkins
2008-Jan-24 20:37 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
On Jan 24, 2008 1:09 PM, dashifen <dashifen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > That''s been my experience as well. Hanging commas just seem to cause > problems for IE from which it (a) doesn''t recover and (b) doesn''t tell > you about.A hanging comma will cause trouble for Safari as well, it''s classified as a warning in the ECMA spec, which puts it on the same level as a missing semicolon, though obviously one causes real problems and one is harmless. I''ve grown in the habit of immediately looking for a hanging comma when weird errors appear in IE and not Firefox. There are JavaScript syntax checkers to catch this type of stuff for you. Andrew Dupont wrote one a while ago for TextMate, it''s saved me on more than one occasion. -justin --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Nicolás Sanguinetti
2008-Jan-25 02:33 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
On Jan 24, 2008 6:37 PM, Justin Perkins <justinperkins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Jan 24, 2008 1:09 PM, dashifen <dashifen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > That''s been my experience as well. Hanging commas just seem to cause > > problems for IE from which it (a) doesn''t recover and (b) doesn''t tell > > you about. > > A hanging comma will cause trouble for Safari as well, it''s classified > as a warning in the ECMA spec, which puts it on the same level as a > missing semicolon, though obviously one causes real problems and one > is harmless. > > I''ve grown in the habit of immediately looking for a hanging comma > when weird errors appear in IE and not Firefox. There are JavaScript > syntax checkers to catch this type of stuff for you. Andrew Dupont > wrote one a while ago for TextMate, it''s saved me on more than one > occasion.As you, when there are weird errors only in IE I look for this immediately, and most of the time it''s the case. And a simple single regular expression does the trick with no need for external tools :) In textmate, find ,(\s*}) and replace for $1 That regexp will surely work in Aptana or your favorite flavor of eclipse :) Best, -Nicolas> -justin > > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
redheat
2008-Jan-25 08:52 UTC
Re: Prototype: Ajax.Request doesn''t work in Internet Explorer
javascriptlint.com points them out. It''s online, and free, although the results can be a bit cryptic at first, but it is generally helpful. On Jan 24, 2:46 pm, "spike2...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org" <spike2...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> That''s it. Firebug didn''t show me this mistake, neither did IE. > Is there a good IDE which shows such things, a free one by any chance. > > Thanks for the help, its always the little mistakes, that let u bang > your head against the wall.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---