I can''t figure out what''s going on because I''ve successfully used Prototype 1.6.0 in a variety of other applications using IE7 as necessary. But, this time I''m getting errors. The exact error is: --------------------------------------------- A Runtime Error has occurred. Do you wish to Debug? Line: 5 Error: ''0'' is null or not an object --------------------------------------------- If I open the MS Script Editor to debug, the debugger lines me up at line 595 in prototype.js which is within the each() method of the Enumerable object. It''s happening on two different machines (the most I can test with for the moment). Oddly, if I go to other pages in which I include prototpye.js (the same exact file, mind you) the error doesn''t happen. Any ideas? David Kees --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
David, Are you saying that IE throws an error with only prototype.js included? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
No; you''re correct. If I don''t include the other JS in the page, prototype is fine. That makes me feel better about that one. Unfortunately, the other JS is just also important. But, it let me know that the problem was elsewhere. That led me to find out that the problem was the following: $w("html body").each(function(el) { $$(el)[0].setStyle({ ... }); }); IE7 is chocking in the each() function call which is why the debugger opened prototype.js rather than my code. Thanks, kangax. On Jan 23, 3:36 pm, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> David, > > Are you saying that IE throws an error with only prototype.js included?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Found out why ... DOM wasn''t ready when the if-statement executed. Wrapped the whole thing in document.obseve("dom:loaded" .... ); and it works fine. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Regarding this snippet, I would go with something like: $$(''html, body'').invoke(''setStyle'', { ... }) This should avoid extra $$ call (will be a little faster) and would look much sexier : ) Best, kangax --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---