On Tuesday, September 29, 2015 at 6:17:00 AM UTC-7, Iancic Bogdan wrote:
>
> For example in the controller I have the following query:
>
> a= db().select(db.my_db.ALL)
>
> How can I add in view a button, such that in real time it shows only the
> rows which have the field a.date bigger than the date that is selected by
> the user. I have seen that I can use ajax to refresh the table in real
> time, but I don't know how to add the button with the date.
>
> Does anyone have an idea?
>
Basically, your button needs to be tied to a javascript event. To set this
up in the controller function, do something like
TAG.BUTTON('filter list', _type="button", _name="filterdate"
, _value=date,
_onclick='$("#my_table").html("updating
..");ajax("mytable.load", ["filterdate"],"my_pdisks")',
_style="display:none", _id="plista"))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.