@massimo: thanks for the clarification, I just remember seeing copy.copy-s there which mislead me. But does it work recursively ?
@johnmc: I'm talking about server-side helpers, not browser-side html elements On Jun 10, 3:21 am, JohnMc <maruadventu...@gmail.com> wrote: > If form -- > > $('form').find('#whatever').... > > works as well, though slower > > On Jun 9, 5:48 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > it returns the actual helper, not a copy. > > > On Jun 9, 4:41 pm, AchipA <attila.cs...@gmail.com> 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 <mdipie...@cs.depaul.edu> wrote: > > > > > It is there already: > > > > > form.element(_id='something')['_class']='red' > > > > > On Jun 9, 2:58 pm, AchipA <attila.cs...@gmail.com> 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 web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---