I am getting and error "Not implemented" for the line that contains: parent = elem.up(''li''); This only happens in IE (both 6 and 7). Works fine in Safari and FF. elem is a valid element, I can even output it to the console. FYI: I am using firebuglite to be able to see errors and have a debug console in IE. Any idea what''s up? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
My guess is that it''s an element, but it''s not extended by Prototype in IE. That''s a pretty typical issue. Wrap it in an $(elem) first. On Thu, May 22, 2008 at 2:23 PM, louis w <louiswalch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am getting and error "Not implemented" for the line that contains: > parent = elem.up(''li''); > This only happens in IE (both 6 and 7). Works fine in Safari and FF. > > elem is a valid element, I can even output it to the console. > > FYI: I am using firebuglite to be able to see errors and have a debug > console in IE. > > Any idea what''s up? Thanks.-- 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 -~----------~----~----~----~------~----~------~--~---
Thanks for the tip. I tried this with no avail. I did some poking around and there is one small discrepancy between FF and IE(7). It looks like the item is different between the two, but it is the same element (confirmed by tagName and className). ** FIREFOX elem: [object HTMLDivElement] elem tagName: DIV elem className: node node-closed over ** IE7 elem: [object] elem tag: DIV elem class: node node-open over Notice the missing HTMLDivElement in IE. On May 22, 3:35 pm, "Frederick Polgardy" <f...-SMQUYeM9IBBWk0Htik3J/w@public.gmane.org> wrote:> My guess is that it''s an element, but it''s not extended by Prototype in IE. > That''s a pretty typical issue. Wrap it in an $(elem) first. > > On Thu, May 22, 2008 at 2:23 PM, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I am getting and error "Not implemented" for the line that contains: > > parent = elem.up(''li''); > > This only happens in IE (both 6 and 7). Works fine in Safari and FF. > > > elem is a valid element, I can even output it to the console. > > > FYI: I am using firebuglite to be able to see errors and have a debug > > console in IE. > > > Any idea what''s up? Thanks. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
What does your complete code look like? -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 -~----------~----~----~----~------~----~------~--~---
Let me try to work up an example. The entire script is more then you need to see. On May 22, 5:15 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What does your complete code look like? > > -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 -~----------~----~----~----~------~----~------~--~---
Here is more complete idea of the code: As I said, IE7 triggers a ''not implemented'' error on the line with parent = $(elem).up(''li''); Also, I am on proto v 1.6.0.2 <script language="javascript"> var TreeNav = { init: function(tree) { $(tree).observe(''click'', this.toggleChildren.bindAsEventListener(this)); } , toggleChildren: function(evnt) { elem = Event.element(evnt); // Is this a node? if (!(elem.hasClassName(''node-open'') || elem.hasClassName(''node- closed''))) return; evnt.stop(); console.log(''elem: ''+elem); console.log(''elem tag: ''+elem.tagName); console.log(''elem class: ''+elem.className); parent = $(elem).up(''li''); console.log(''parent: ''+parent); return; } }; document.observe(''dom:loaded'', function(event) { TreeNav.init(''treeav''); }); </script> On May 22, 5:41 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Let me try to work up an example. The entire script is more then you > need to see. > > On May 22, 5:15 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > What does your complete code look like? > > > -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 -~----------~----~----~----~------~----~------~--~---
any idea ? :( On May 22, 6:17 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here is more complete idea of the code: > As I said, IE7 triggers a ''not implemented'' error on the line with > parent = $(elem).up(''li''); > Also, I am on proto v 1.6.0.2 > > <script language="javascript"> > > var TreeNav = { > > init: function(tree) { > $(tree).observe(''click'', > this.toggleChildren.bindAsEventListener(this)); > } > > , toggleChildren: function(evnt) { > > elem = Event.element(evnt); > > // Is this a node? > if (!(elem.hasClassName(''node-open'') || elem.hasClassName(''node- > closed''))) return; > > evnt.stop(); > > console.log(''elem: ''+elem); > console.log(''elem tag: ''+elem.tagName); > console.log(''elem class: ''+elem.className); > > parent = $(elem).up(''li''); > > console.log(''parent: ''+parent); > > return; > > } > > }; > > document.observe(''dom:loaded'', function(event) { > TreeNav.init(''treeav''); > }); > </script> > > On May 22, 5:41 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Let me try to work up an example. The entire script is more then you > > need to see. > > > On May 22, 5:15 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > What does your complete code look like? > > > > -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 -~----------~----~----~----~------~----~------~--~---
Try eliminating global variable declaration (i.e. "elem", "parent", etc.) Also, check that all id''s are unique on the page. Best, kangax On May 23, 8:00 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> any idea ? :( > > On May 22, 6:17 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Here is more complete idea of the code: > > As I said, IE7 triggers a ''not implemented'' error on the line with > > parent = $(elem).up(''li''); > > Also, I am on proto v 1.6.0.2 > > > <script language="javascript"> > > > var TreeNav = { > > > init: function(tree) { > > $(tree).observe(''click'', > > this.toggleChildren.bindAsEventListener(this)); > > } > > > , toggleChildren: function(evnt) { > > > elem = Event.element(evnt); > > > // Is this a node? > > if (!(elem.hasClassName(''node-open'') || elem.hasClassName(''node- > > closed''))) return; > > > evnt.stop(); > > > console.log(''elem: ''+elem); > > console.log(''elem tag: ''+elem.tagName); > > console.log(''elem class: ''+elem.className); > > > parent = $(elem).up(''li''); > > > console.log(''parent: ''+parent); > > > return; > > > } > > > }; > > > document.observe(''dom:loaded'', function(event) { > > TreeNav.init(''treeav''); > > }); > > </script> > > > On May 22, 5:41 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Let me try to work up an example. The entire script is more then you > > > need to see. > > > > On May 22, 5:15 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > What does your complete code look like? > > > > > -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 -~----------~----~----~----~------~----~------~--~---
Sorry for the late follow up. I just wanted to let any one know who searches for this problem on here that it was what kangax suggested. Global variable name conflicts. On May 27, 9:22 am, kangax <kan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try eliminating global variable declaration (i.e."elem", "parent", > etc.) > Also, check that all id''s are unique on the page. > > Best, > kangax > > On May 23, 8:00 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > any idea ? :( > > > On May 22, 6:17 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Here is more complete idea of the code: > > > As I said, IE7 triggers a ''not implemented'' error on the line with > > > parent = $(elem).up(''li''); > > > Also, I am on proto v 1.6.0.2 > > > > <script language="javascript"> > > > > var TreeNav = { > > > > init: function(tree) { > > > $(tree).observe(''click'', > > > this.toggleChildren.bindAsEventListener(this)); > > > } > > > > , toggleChildren: function(evnt) { > > > > elem = Event.element(evnt); > > > > // Is this a node? > > > if (!(elem.hasClassName(''node-open'') || elem.hasClassName(''node- > > > closed''))) return; > > > > evnt.stop(); > > > > console.log(''elem: ''+elem); > > > console.log(''elem tag: ''+elem.tagName); > > > console.log(''elem class: ''+elem.className); > > > > parent = $(elem).up(''li''); > > > > console.log(''parent: ''+parent); > > > > return; > > > > } > > > > }; > > > > document.observe(''dom:loaded'', function(event) { > > > TreeNav.init(''treeav''); > > > }); > > > </script> > > > > On May 22, 5:41 pm, louis w <louiswa...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Let me try to workupan example. The entire script is more then you > > > > need to see. > > > > > On May 22, 5:15 pm, "Justin Perkins" <justinperk...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > What does your complete code look like? > > > > > > -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 -~----------~----~----~----~------~----~------~--~---