On Wednesday, August 26, 2015 at 6:03:04 AM UTC-7, Iancic Bogdan wrote:
>
> All the images will be saved in static
>
> On Wednesday, August 26, 2015 at 2:54:25 PM UTC+2, Iancic Bogdan wrote:
>>
>> I want to add a column to my table where will be displayed icons. Also,
>> when the user clicks on the icon I would like the icon to overlay.
>>
>> Can anyone help? I looked over the documentation but I didn't find
>> anything
>>
>
What do you mean by "overlay"?
I do something like this in a view:
<TABLE>
/* thead stuff */
{{if datalist[3] == 0:}}
{{errstat = IMG(_src=URL('static', "images/greenlite.png"),
_alt="Green Traffic Light Picture")}}
{{else:}}
{{errstat = IMG(_src=URL('static', "images/redlite.png"),
_alt="Red Traffic Light Picture")}}
{{pass}}
{{=TR(/* various fields */, TD(
A(errstat,_href=URL('detailinfo.html',
vars=dict(var1=datalist[1], var2=datalist[0])))))
}}
</TABLE>
clicking on the image takes you to a page that gives you more detail. You
could make that be an AJAX call if you wanted the details to be shown in a
DIV on the current page.
/dps
--
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.