Hi Ran,

When you create an element there's about everything you can do with it
without it even being in your document. What you need to realize is that
some methods use the elements around your target element. If you haven't
inserted your element into your document this could cause errors.

You can create the entire element and child elements without any problems.
You can even update() it, and addClassNames() if you want. Just realize that
trying to find it's ancestor will fail when you haven't insert()ed it.

Greetings,
Johan Arensman

On Tue, Jun 15, 2010 at 12:34 PM, Ran Berenfeld <berenfeld...@gmail.com>wrote:

> Hello
>
> I have a general question that disturbs me, especially since I see some
> strange behaviors sometimes.
> support I have a new DOM Element, created using new Element("tag")
> and I have 2 things to do :
> 1. update the element attributes, css inline styles, add css classes, etc
> 2. insert the element into the DOM tree, for example using insert() method
>
> can you tell me what is the proper sequence ? I get a feeling that
> sometimes the browser rendering can change
> depending on the order of the two (especially in IE). is it true ?
>
> Thanks
>
> Ran
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to