If form --
$('form').find('#whatever')....
works as well, though slower
On Jun 9, 5:48 pm, mdipierro <[email protected]> wrote:
> it returns the actual helper, not a copy.
>
> On Jun 9, 4:41 pm, AchipA <[email protected]> wrote:
>
> > Err... I was under the impression div.element only works on direct
> > child nodes and even there it returns just a copy on the helper (not
> > the reference to the actual one). Been quite a while since I looked in
> > html.py, so I might be wrong, though...
>
> > On Jun 9, 10:33 pm, mdipierro <[email protected]> wrote:
>
> > > It is there already:
>
> > > form.element(_id='something')['_class']='red'
>
> > > On Jun 9, 2:58 pm, AchipA <[email protected]> wrote:
>
> > > > Another idea while I wait for some of my computations to finish.
> > > > Javascript can access HTML elements in different ways. With web2py
> > > > helpers, this can get a bit cumbersome. How about a generic
> > > > getHelperById method for the base helper class so it goes through it's
> > > > components and fetches the helper with the required id, saving us
> > > > plenty of for cycles/recursion and introspection ? It might especially
> > > > be useful adressing stuff like FORMs (like getting a particular INPUT
> > > > element which might be embedded into layers and layers of helpers
> > > > inside that FORM).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---