I just installed the new version of prototype but got the following error in Firefox: $(parentElement || document.body) has no properties on line 4180 of prototype.js. Has anyone else run into this error and been able to fix it? Thanks in advance, Vinicius --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Are you calling document.getElementsByClassName before the dom loads? document.getElementsByClassName is deprecated because some browsers support it natively and their implementation is different than Prototypes. You should use $$() instead and only after the dom loads. - JDD --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, We''ve started transitioning to a new, better-named, hopefully-spam- free group for Prototype and script.aculo.us: http://groups.google.com/group/prototype-scriptaculous/ prototype-scriptaculous-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Please post any new questions there rather than here, we''re just trying to finish up existing conversations here... Thanks, -- T.J. Crowder tj / crowder software / com On Jul 10, 2:10 am, Vinicius Vacanti <vaca...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I just installed the new version of prototype but got the following > error in Firefox: > > $(parentElement || document.body) has no properties > > on line 4180 of prototype.js. > > Has anyone else run into this error and been able to fix it? > > Thanks in advance, > Vinicius--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 10 Jul 2008, at 03:36, jdalton wrote:> Are you calling document.getElementsByClassName before the dom loads? > document.getElementsByClassName is deprecated because some browsers > support it natively and their implementation is different than > Prototypes. You should use $$() instead and only after the dom loads.or just do $A(document.getElementsByClassName(''classname'')), which will return an extended element array. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
But not an array of extended elements. :-) -Fred On Thu, Jul 10, 2008 at 6:56 AM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> or just do $A(document.getElementsByClassName(''classname'')), which > will return an extended element array.-- Science answers questions; philosophy questions answers. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
@Frederick - in this case $A(document.getElementsByClassName(''classname'')) would convert the nodeList into an array (arrays are naturally extended via their .prototype). In Firefox and other browsers all HTML elements inherit from the Element.prototype so the elements would already be extended. @Peter - The fact that document.getElementsByClassName() is deprecated is reason enough not to use it. Also it is painfully long to type whereas $$() or element.select() are much easier. - JDD --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
This solved my problem. Thanks! On Jul 10, 9:25 am, jdalton <John.David.Dal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> @Frederick - in this case > $A(document.getElementsByClassName(''classname'')) would convert the > nodeList into an array (arrays are naturally extended via > their .prototype). In Firefox and other browsers all HTML elements > inherit from the Element.prototype so the elements would already be > extended. > > @Peter - The fact that document.getElementsByClassName() is deprecated > is reason enough not to use it. Also it is painfully long to type > whereas $$() or element.select() are much easier. > > - JDD--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---