HTML helpers act as Python lists with respect to their components, so if you
know the indexes, you can do things like:
grid[i][j][k] = some_other_html_element
del grid[i][j][k]
I'm not sure if you can do assignments or deletions via .elements(), though.
Anthony
On Thursday, October 6, 2011 12:39:54 PM UTC-4, apple wrote:
>
> web2py elements allows me to parse the dom; change attributes; and
> insert elements. But is it possible to remove elements entirely or to
> replace elements with new html?
>
> e.g. I can hide the buttons in a grid by doing this:
>
> pagination=grid.elements('.web2py_paginator')
> if pagination:
> pagination[0].update(_style="visibility:hidden")
>
> But is there a way I could replace the buttons with some html
> generated in web2py?
>
>