Hey Guys, i''m trying to traverse the dom and having not much luck. Current browser is IE6. I have confirmed the element is extended, (_extended:true) as I just called Element.extend($(this).parentNode.parentNode) What I actually want is $(this).up(2).next(1) but the up and next methods are throwing invalid property or method errors. I can check the element using the dom viewer as part of the developer toolbar, and while the element has methods such as getHeight, removeClassName etc there is no Next/Up/Down methods defined. Has this changed in 1.5.1? Am I doing something wrong? I am aware of the IE not properly extending elements issue, which is why I did the manual Element.extend. Element.extend($(this).parentNode.parentNode); //Throws error alert($(this).parentNode.parentNode.next()); On further inspection, this syntax isn''t working in firefox either: it throws Error: Selector.handlers has no properties Source File: http://localhost:1694/Listz/Javascript/prototype.js Line: 1457 What the--- Gareth --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You probably mean: $(this).up(1).next(); Indexes start with 0 for the traversal methods. best, Thomas Am 05.06.2007 um 11:17 schrieb Gareth Evans:> Hey Guys, i''m trying to traverse the dom and having not much luck. > Current browser is IE6. > I have confirmed the element is extended, (_extended:true) as I > just called Element.extend($(this).parentNode.parentNode) > > What I actually want is $(this).up(2).next(1) but the up and next > methods are throwing invalid property or method errors. > I can check the element using the dom viewer as part of the > developer toolbar, and while the element has methods such as > getHeight, removeClassName etc there is no Next/Up/Down methods > defined. > > Has this changed in 1.5.1? > > Am I doing something wrong? > I am aware of the IE not properly extending elements issue, which > is why I did the manual Element.extend. > Element.extend($( > > this).parentNode.parentNode); > //Throws error > > alert($(this).parentNode.parentNode.next()); > > > On further inspection, this syntax isn''t working in firefox either: > it throws > > Error: Selector.handlers has no properties > Source File: http://localhost:1694/Listz/Javascript/prototype.js > Line: 1457 > > > What the--- > > > Gareth > > > >--~--~---------~--~----~------------~-------~--~----~ 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, i''ll remember that but the actual methods are throwing errors, not method calls to the elements they should return I''m just implementing the test page from http://www.prototypejs.org/api/element/next to see if i''m doing something odd... Gareth On 6/5/07, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org> wrote:> > You probably mean: > > $(this).up(1).next(); > > > Indexes start with 0 for the traversal methods. > > > best, > Thomas > > Am 05.06.2007 um 11:17 schrieb Gareth Evans: > > Hey Guys, i''m trying to traverse the dom and having not much luck. > Current browser is IE6. > I have confirmed the element is extended, (_extended:true) as I just > called Element.extend($(this).parentNode.parentNode) > What I actually want is $(this).up(2).next(1) but the up and next methods > are throwing invalid property or method errors. > I can check the element using the dom viewer as part of the developer > toolbar, and while the element has methods such as getHeight, > removeClassName etc there is no Next/Up/Down methods defined. > Has this changed in 1.5.1? > Am I doing something wrong? > I am aware of the IE not properly extending elements issue, which is why I > did the manual Element.extend. > > Element.extend($( > this).parentNode.parentNode); > > //Throws error > > alert($(this).parentNode.parentNode.next()); > On further inspection, this syntax isn''t working in firefox either: it > throws > Error: Selector.handlers has no properties > Source File: http://localhost:1694/Listz/Javascript/prototype.js > Line: 1457 > What the--- > Gareth > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ok, I''m cracking up due to lack of food or something http://202.49.89.140/test.html This works, it''s a stripped implementation of the test page. The code in the context of my page, slightly modified doesn''t. var el = $(this._relative); alert(el.id); alert(el.parentNode.parentNode.classNames()); alert(el.up(1).classNames()); The first alert, returns the expected element''s id. The grandparent of the element doesn''t have an Id, so I''ve switched to using its className to identify it. The second alert returns the correct class name. The third alert errors: IE: Object doesn''t support this property or method Firefox: Error: Selector.findElement is not a function Source File: http://localhost:1694/Listz/Javascript/prototype.js Line: 1435 What else should I check? Gareth On 6/5/07, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Thanks, i''ll remember that but the actual methods are throwing errors, not > method calls to the elements they should return > I''m just implementing the test page from > http://www.prototypejs.org/api/element/next > to see if i''m doing something odd... > > Gareth > > > On 6/5/07, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org > wrote: > > > > You probably mean: > > > > $(this).up(1).next(); > > > > > > Indexes start with 0 for the traversal methods. > > > > > > best, > > Thomas > > > > Am 05.06.2007 um 11:17 schrieb Gareth Evans: > > > > Hey Guys, i''m trying to traverse the dom and having not much luck. > > Current browser is IE6. > > I have confirmed the element is extended, (_extended:true) as I just > > called Element.extend($(this).parentNode.parentNode) > > What I actually want is $(this).up(2).next(1) but the up and next > > methods are throwing invalid property or method errors. > > I can check the element using the dom viewer as part of the developer > > toolbar, and while the element has methods such as getHeight, > > removeClassName etc there is no Next/Up/Down methods defined. > > Has this changed in 1.5.1? > > Am I doing something wrong? > > I am aware of the IE not properly extending elements issue, which is why > > I did the manual Element.extend. > > > > Element.extend($( > > this).parentNode.parentNode); > > > > //Throws error > > > > alert($(this).parentNode.parentNode.next()); > > On further inspection, this syntax isn''t working in firefox either: it > > throws > > Error: Selector.handlers has no properties > > Source File: http://localhost:1694/Listz/Javascript/prototype.js > > Line: 1457 > > What the--- > > Gareth > > > > > > > > > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Do the DOM traversal functions return extended elements? It might be that "this" is an extended element so you can call $(this).up() (or perhaps just this.up()?) but then the element returned from the up() function may not be extended and, therefore, has no next() method. Not sure if this is the case, just what jumped out at me from the get-go. - Dash - Gareth Evans wrote:> Ok, I''m cracking up due to lack of food or something > > http://202.49.89.140/test.html > > This works, it''s a stripped implementation of the test page. > > > The code in the context of my page, slightly modified doesn''t. > > var el = $(this._relative); > alert(el.id); > alert(el.parentNode.parentNode.classNames()); > alert(el.up(1).classNames()); > > The first alert, returns the expected element''s id. > > The grandparent of the element doesn''t have an Id, so I''ve switched to using > its className to identify it. > The second alert returns the correct class name. > > The third alert errors: > > IE: > Object doesn''t support this property or method > > Firefox: > Error: Selector.findElement is not a function > Source File: http://localhost:1694/Listz/Javascript/prototype.js > Line: 1435 > > What else should I check? > > Gareth > > On 6/5/07, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Thanks, i''ll remember that but the actual methods are throwing errors, not >> method calls to the elements they should return >> I''m just implementing the test page from >> http://www.prototypejs.org/api/element/next >> to see if i''m doing something odd... >> >> Gareth >> >> >> On 6/5/07, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org > wrote: >> >>> You probably mean: >>> >>> $(this).up(1).next(); >>> >>> >>> Indexes start with 0 for the traversal methods. >>> >>> >>> best, >>> Thomas >>> >>> Am 05.06.2007 um 11:17 schrieb Gareth Evans: >>> >>> Hey Guys, i''m trying to traverse the dom and having not much luck. >>> Current browser is IE6. >>> I have confirmed the element is extended, (_extended:true) as I just >>> called Element.extend($(this).parentNode.parentNode) >>> What I actually want is $(this).up(2).next(1) but the up and next >>> methods are throwing invalid property or method errors. >>> I can check the element using the dom viewer as part of the developer >>> toolbar, and while the element has methods such as getHeight, >>> removeClassName etc there is no Next/Up/Down methods defined. >>> Has this changed in 1.5.1? >>> Am I doing something wrong? >>> I am aware of the IE not properly extending elements issue, which is why >>> I did the manual Element.extend. >>> >>> Element.extend($( >>> this).parentNode.parentNode); >>> >>> //Throws error >>> >>> alert($(this).parentNode.parentNode.next()); >>> On further inspection, this syntax isn''t working in firefox either: it >>> throws >>> Error: Selector.handlers has no properties >>> Source File: http://localhost:1694/Listz/Javascript/prototype.js >>> Line: 1457 >>> What the--- >>> Gareth >>> >>> >>> >>> >>> >>> >>> >>> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
According to the code and the documentation, the traversal methods extend elements. I should stress that if I remove the .classNames part, it still errors on the up() eg: var el2 = el.up(1); We know that el is extended because it''s been through a call to $. el2 is null. Gareth On 6/6/07, David Dashifen Kees <dashifen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Do the DOM traversal functions return extended elements? It might be > that "this" is an extended element so you can call $(this).up() (or > perhaps just this.up()?) but then the element returned from the up() > function may not be extended and, therefore, has no next() method. Not > sure if this is the case, just what jumped out at me from the get-go. > > - Dash - > > Gareth Evans wrote: > > Ok, I''m cracking up due to lack of food or something > > > > http://202.49.89.140/test.html > > > > This works, it''s a stripped implementation of the test page. > > > > > > The code in the context of my page, slightly modified doesn''t. > > > > var el = $(this._relative); > > alert(el.id); > > alert(el.parentNode.parentNode.classNames()); > > alert(el.up(1).classNames()); > > > > The first alert, returns the expected element''s id. > > > > The grandparent of the element doesn''t have an Id, so I''ve switched to > using > > its className to identify it. > > The second alert returns the correct class name. > > > > The third alert errors: > > > > IE: > > Object doesn''t support this property or method > > > > Firefox: > > Error: Selector.findElement is not a function > > Source File: http://localhost:1694/Listz/Javascript/prototype.js > > Line: 1435 > > > > What else should I check? > > > > Gareth > > > > On 6/5/07, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> Thanks, i''ll remember that but the actual methods are throwing errors, > not > >> method calls to the elements they should return > >> I''m just implementing the test page from > >> http://www.prototypejs.org/api/element/next > >> to see if i''m doing something odd... > >> > >> Gareth > >> > >> > >> On 6/5/07, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org > wrote: > >> > >>> You probably mean: > >>> > >>> $(this).up(1).next(); > >>> > >>> > >>> Indexes start with 0 for the traversal methods. > >>> > >>> > >>> best, > >>> Thomas > >>> > >>> Am 05.06.2007 um 11:17 schrieb Gareth Evans: > >>> > >>> Hey Guys, i''m trying to traverse the dom and having not much luck. > >>> Current browser is IE6. > >>> I have confirmed the element is extended, (_extended:true) as I just > >>> called Element.extend($(this).parentNode.parentNode) > >>> What I actually want is $(this).up(2).next(1) but the up and next > >>> methods are throwing invalid property or method errors. > >>> I can check the element using the dom viewer as part of the developer > >>> toolbar, and while the element has methods such as getHeight, > >>> removeClassName etc there is no Next/Up/Down methods defined. > >>> Has this changed in 1.5.1? > >>> Am I doing something wrong? > >>> I am aware of the IE not properly extending elements issue, which is > why > >>> I did the manual Element.extend. > >>> > >>> Element.extend($( > >>> this).parentNode.parentNode); > >>> > >>> //Throws error > >>> > >>> alert($(this).parentNode.parentNode.next()); > >>> On further inspection, this syntax isn''t working in firefox either: > it > >>> throws > >>> Error: Selector.handlers has no properties > >>> Source File: http://localhost:1694/Listz/Javascript/prototype.js > >>> Line: 1457 > >>> What the--- > >>> Gareth > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 el.up() On Jun 5, 6:36 pm, "Gareth Evans" <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> According to the code and the documentation, the traversal methods extend > elements. > I should stress that if I remove the .classNames part, it still errors on > the up() > > eg: > var el2 = el.up(1); > > We know that el is extended because it''s been through a call to $. > > el2 is null. > > Gareth > > On 6/6/07, David Dashifen Kees <dashi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Do the DOM traversal functions return extended elements? It might be > > that "this" is an extended element so you can call $(this).up() (or > > perhaps just this.up()?) but then the element returned from the up() > > function may not be extended and, therefore, has no next() method. Not > > sure if this is the case, just what jumped out at me from the get-go. > > > - Dash - > > > Gareth Evans wrote: > > > Ok, I''m cracking up due to lack of food or something > > > >http://202.49.89.140/test.html > > > > This works, it''s a stripped implementation of the test page. > > > > The code in the context of my page, slightly modified doesn''t. > > > > var el = $(this._relative); > > > alert(el.id); > > > alert(el.parentNode.parentNode.classNames()); > > > alert(el.up(1).classNames()); > > > > The first alert, returns the expected element''s id. > > > > The grandparent of the element doesn''t have an Id, so I''ve switched to > > using > > > its className to identify it. > > > The second alert returns the correct class name. > > > > The third alert errors: > > > > IE: > > > Object doesn''t support this property or method > > > > Firefox: > > > Error: Selector.findElement is not a function > > > Source File:http://localhost:1694/Listz/Javascript/prototype.js > > > Line: 1435 > > > > What else should I check? > > > > Gareth > > > > On 6/5/07, Gareth Evans <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> Thanks, i''ll remember that but the actual methods are throwing errors, > > not > > >> method calls to the elements they should return > > >> I''m just implementing the test page from > > >>http://www.prototypejs.org/api/element/next > > >> to see if i''m doing something odd... > > > >> Gareth > > > >> On 6/5/07, Thomas Fuchs <t.fu...-moWQItti3gBl57MIdRCFDg@public.gmane.org > wrote: > > > >>> You probably mean: > > > >>> $(this).up(1).next(); > > > >>> Indexes start with 0 for the traversal methods. > > > >>> best, > > >>> Thomas > > > >>> Am 05.06.2007 um 11:17 schrieb Gareth Evans: > > > >>> Hey Guys, i''m trying to traverse the dom and having not much luck. > > >>> Current browser is IE6. > > >>> I have confirmed the element is extended, (_extended:true) as I just > > >>> called Element.extend($(this).parentNode.parentNode) > > >>> What I actually want is $(this).up(2).next(1) but the up and next > > >>> methods are throwing invalid property or method errors. > > >>> I can check the element using the dom viewer as part of the developer > > >>> toolbar, and while the element has methods such as getHeight, > > >>> removeClassName etc there is no Next/Up/Down methods defined. > > >>> Has this changed in 1.5.1? > > >>> Am I doing something wrong? > > >>> I am aware of the IE not properly extending elements issue, which is > > why > > >>> I did the manual Element.extend. > > > >>> Element.extend($( > > >>> this).parentNode.parentNode); > > > >>> //Throws error > > > >>> alert($(this).parentNode.parentNode.next()); > > >>> On further inspection, this syntax isn''t working in firefox either: > > it > > >>> throws > > >>> Error: Selector.handlers has no properties > > >>> Source File:http://localhost:1694/Listz/Javascript/prototype.js > > >>> Line: 1457 > > >>> What the--- > > >>> Gareth--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Okay... I''m thinking somethings not getting extended somewhere... var el = $($(this._relative).id); alert(el); //object alert(el.parentNode.parentNode); //object alert(el.up()); //ie: object doesnt support this property or method //ff: object alert(el.up(1)); //ie: never gets called //ff: Error: Selector.findElement is not a function, Source File: prototype.js Line <http://localhost:1694/Listz/Javascript/prototype.js Line>: 1435 Gareth On 6/6/07, tobie <tobie.langel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > try el.up() > > On Jun 5, 6:36 pm, "Gareth Evans" <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > According to the code and the documentation, the traversal methods > extend > > elements. > > I should stress that if I remove the .classNames part, it still errors > on > > the up() > > > > eg: > > var el2 = el.up(1); > > > > We know that el is extended because it''s been through a call to $. > > > > el2 is null. > > > > Gareth > > > > On 6/6/07, David Dashifen Kees <dashi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Do the DOM traversal functions return extended elements? It might be > > > that "this" is an extended element so you can call $(this).up() (or > > > perhaps just this.up()?) but then the element returned from the up() > > > function may not be extended and, therefore, has no next() > method. Not > > > sure if this is the case, just what jumped out at me from the get-go. > > > > > - Dash - > > > > > Gareth Evans wrote: > > > > Ok, I''m cracking up due to lack of food or something > > > > > >http://202.49.89.140/test.html > > > > > > This works, it''s a stripped implementation of the test page. > > > > > > The code in the context of my page, slightly modified doesn''t. > > > > > > var el = $(this._relative); > > > > alert(el.id); > > > > alert(el.parentNode.parentNode.classNames()); > > > > alert(el.up(1).classNames()); > > > > > > The first alert, returns the expected element''s id. > > > > > > The grandparent of the element doesn''t have an Id, so I''ve switched > to > > > using > > > > its className to identify it. > > > > The second alert returns the correct class name. > > > > > > The third alert errors: > > > > > > IE: > > > > Object doesn''t support this property or method > > > > > > Firefox: > > > > Error: Selector.findElement is not a function > > > > Source File:http://localhost:1694/Listz/Javascript/prototype.js > > > > Line: 1435 > > > > > > What else should I check? > > > > > > Gareth > > > > > > On 6/5/07, Gareth Evans <agr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > >> Thanks, i''ll remember that but the actual methods are throwing > errors, > > > not > > > >> method calls to the elements they should return > > > >> I''m just implementing the test page from > > > >>http://www.prototypejs.org/api/element/next > > > >> to see if i''m doing something odd... > > > > > >> Gareth > > > > > >> On 6/5/07, Thomas Fuchs <t.fu...-moWQItti3gBl57MIdRCFDg@public.gmane.org > wrote: > > > > > >>> You probably mean: > > > > > >>> $(this).up(1).next(); > > > > > >>> Indexes start with 0 for the traversal methods. > > > > > >>> best, > > > >>> Thomas > > > > > >>> Am 05.06.2007 um 11:17 schrieb Gareth Evans: > > > > > >>> Hey Guys, i''m trying to traverse the dom and having not much > luck. > > > >>> Current browser is IE6. > > > >>> I have confirmed the element is extended, (_extended:true) as I > just > > > >>> called Element.extend($(this).parentNode.parentNode) > > > >>> What I actually want is $(this).up(2).next(1) but the up and next > > > >>> methods are throwing invalid property or method errors. > > > >>> I can check the element using the dom viewer as part of the > developer > > > >>> toolbar, and while the element has methods such as getHeight, > > > >>> removeClassName etc there is no Next/Up/Down methods defined. > > > >>> Has this changed in 1.5.1? > > > >>> Am I doing something wrong? > > > >>> I am aware of the IE not properly extending elements issue, which > is > > > why > > > >>> I did the manual Element.extend. > > > > > >>> Element.extend($( > > > >>> this).parentNode.parentNode); > > > > > >>> //Throws error > > > > > >>> alert($(this).parentNode.parentNode.next()); > > > >>> On further inspection, this syntax isn''t working in firefox > either: > > > it > > > >>> throws > > > >>> Error: Selector.handlers has no properties > > > >>> Source File:http://localhost:1694/Listz/Javascript/prototype.js > > > >>> Line: 1457 > > > >>> What the--- > > > >>> Gareth > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
If this._relative is an element than: var el = $(this._relative) will return the same element, extended. el.up() should return an extended element (el''s first parent element). el.up(1) should also return an extend element (el''s grand-parent) My guess is that either this_relative isn''t a DOM element, or you''re having some ill formed html (identical ids on the same page or what not). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Yeah, I was thinking maybe it wasn''t appended to the dom or something silly, hence the reason the first line reading var el = $($(this._relative).id); If you are familiar with the IE dom explorer, You can look at elements and see their properties. In the test quoted further up, if I look at one of my extended elements, next/prev etc traversal methods are showing. When I check the element that the call to up() is failing on, those methods aren''t there. There are *some* prototype elements though, for example, addClassName is there. Im pretty sure it''s an element since el.parentNode.parentNode returns object, or in firefox, htmldomelement (or something like that, cant remember the exact wording) Whats confusing me is that while el.up() works in firefox, el.up(1) doesn''t (which it should since the .parentNode.parentNode call works) and I can''t see for the life of me why el.up() wouldn''t exist/work in IE. I appreciate it''s hard to debug this without a proper working example, it seems every time I try to copy one of these problems out, it goes away.. seems to only exist in context. If it''s of any consequence, the div that i''m trying to work upwards to is a sortable (so it may already be extended but not with all methods?), and el is an input field. Gareth On 6/6/07, tobie <tobie.langel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > If this._relative is an element than: > > var el = $(this._relative) will return the same element, extended. > el.up() should return an extended element (el''s first parent element). > el.up(1) should also return an extend element (el''s grand-parent) > > My guess is that either this_relative isn''t a DOM element, or you''re > having some ill formed html (identical ids on the same page or what > not). > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m assuming you''re running 1.5.1, correct ? Also, does your page validate ? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Definitely. var Prototype = { Version: ''1.5.1'', Validation, i had to save the .html content out and run it through the validator: There are about 35 odd errors but mostly trival. Things like missing alt attributes. Do you want me to to post the full validation results, not sure they''ll paste into the email correctly. I really appreciate your help here, i could find a workaround for the prob but i guess its more the principal now, if i have the problem again I need to know what to look for! Gareth On 6/6/07, tobie <tobie.langel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > I''m assuming you''re running 1.5.1, correct ? > > Also, does your page validate ? > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---