Thanks a lot for the idea with ancestor - I have resolve the problem

On 7 окт, 05:34, RobG <[EMAIL PROTECTED]> wrote:
> On Oct 7, 12:22 pm, buda <[EMAIL PROTECTED]> wrote:
>
> > Thanks for idea, there is no any way by doing it with prototype.js
> > nativly?
>
> Sure, use $A to convert the returned NodeList to an array and use each
> to iterate over it.  As far as I know, Prototype.js doesn't wrap
> getElementsByTagName - what would be the point?
>
> An alternative is to get all the form's controls (form.elements) and
> iterate over those to find which have the div as a ancestor.
>
> Depending on the distribution of other elements in the div, that may
> be faster but perhaps not noticeably so.  You can optimise performance
> by stopping the filter as soon as you stop getting form controls that
> have div as an ancestor.
>
> --
> Rob
--~--~---------~--~----~------------~-------~--~----~
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-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to