$(elParent).readAttribute('style')
is elParent a var of an extended element? my first guess would be that it is.. if it is.. try: elParent.readAttribute('style') if its not... try: $('elParent').readAttribute('style') same with: el.writeAttribute(.... so... put together: el.writeAttribute('style', elParent.readAttribute('style')); Also, i'd replace the methods... el.setAttribute('style', elParent.getAttribute('style')); I just tried this in IE 7 and it worked. readAttribute and writeAttribute have issues in IE7... On Thu, Apr 30, 2009 at 10:13 AM, bazikch <bazik...@gmail.com> wrote: > > Hello, > > I'm trying to do the following: > $(el).writeAttribute('style', $(elParent).readAttribute('style')); > > Everything is going fine until I try to clone the el position > (#clonePosition). > > IE throws the error: 'style' is null or not an object on line 2271 > (#Element.Methods.getStyle). > > The strange thing is when I look at the DOM, the el element has an > _undefined_ attribute with the previous copied style. IMHO this lead > to the mentionned error. > > Is this a bug or the _standard_ behaviour of IE? > > Thanks in advance. > > [Prototype version 1.6.0.2] > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---