What about this code:
        if(!element.id || element.id!=id)
                var tmp=[];
                var t=document.getElementById(id);
                while(t!=null && t.id!=id)
However the ie protect its input element and do not let setAttribute
change its name attribute, only way to change it is to change
outerHTML which is very ugly, so I believe $$("*").detect is the best

On Jun 17, 9:34 pm, "Mislav Marohnić" <[EMAIL PROTECTED]>
> On 6/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > is there some performance difference between these two code? Thanks
> Using the CSS selector instead of Enumerable enables the use of XPath. But
> since IE doesn't support XPath and the hack above is for IE and Opera, I'd
> dare to say that there is no much difference in execution time. One more
> thing:
>   $$('*[id=' + id + ']')
> Am I right when saying that this will fail if the ID was dynamically set (in
> other words, it was not an attribute in HTML source)?

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 [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to