[web2py] Re: loop inside helper
You got it! Thanks!!! On Feb 16, 1:10 am, Anthony abasta...@gmail.com wrote: I am trying to add a jquery effect, to each row based on its id, but i am having trouble formatting the _onclick=jQuery('id').toggle() _onclick=jQuery('%s').toggle() % row.id Anthony
[web2py] Re: loop inside helper
A list comprehension might be easier. Note, if you put non-TD elements in a TR, they will automatically be put inside separate TD's within the TR. If you provide some details regarding your query and the result you're trying to achieve, we may be able to provide more specific advice. Anthony On Thursday, February 16, 2012 12:35:34 AM UTC-5, web-dev-m wrote: I am trying to construct a complex form in a web2py controller that loops over a query and inserts an INPUT() element in a TD() element. Is there a syntax for looping within a helper or should I do this some other way? Thanks!
[web2py] Re: loop inside helper
That is seeming to work, except for one thing. I am trying to add a jquery effect, to each row based on its id, but i am having trouble formatting the _onclick=jQuery('id').toggle() ...I cant seem to find a way to get the dynamic id in there. I guess I will have to write a jquery function to parse for the id. Probably neater too! Thanks for the help! On Feb 15, 11:49 pm, Anthony abasta...@gmail.com wrote: A list comprehension might be easier. Note, if you put non-TD elements in a TR, they will automatically be put inside separate TD's within the TR. If you provide some details regarding your query and the result you're trying to achieve, we may be able to provide more specific advice. Anthony On Thursday, February 16, 2012 12:35:34 AM UTC-5, web-dev-m wrote: I am trying to construct a complex form in a web2py controller that loops over a query and inserts an INPUT() element in a TD() element. Is there a syntax for looping within a helper or should I do this some other way? Thanks!
[web2py] Re: loop inside helper
I am trying to add a jquery effect, to each row based on its id, but i am having trouble formatting the _onclick=jQuery('id').toggle() _onclick=jQuery('%s').toggle() % row.id Anthony