Re: [web2py] How to clear a list in a view with jquery

2020-06-07 Thread António Ramos
i guess you mean
{{for detail in details:}}
instead of
{{for detail*s* in details:}}

anyway
the python code is rendered in server before being sent to the view. so
your script cant change any of your python code output
You could use the ajax function to update a div content or better vuejs or
other frontend framework...

Ramos

Em sáb., 6 de jun. de 2020 às 23:13, mostwanted 
escreveu:

> Guys is it possible to clear a list in a view using jquery?
> Something like this:
>
> *CODE EXAMPLE:*
> {{if details:}}
> {{for details in details:}}
>
> {{=details.first_name}}
> {{=details.last_name}}
> {{pass}}
>
>
>
>
>
>
>
>
>
>
> *$(function(){$('#close').click(function(e){{{details.clear()}};});});*
>
> How can I achieve this because?
>
> Regards;
>
> Mostwanted
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/9831eef9-75ec-4c58-b86b-92f97d59e510o%40googlegroups.com
> 
> .
>

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAEM0BxNm1_4ovkC5aD2XCbSztLDExOC-EyvSLpoAN43gDgA8fA%40mail.gmail.com.


[web2py] How to clear a list in a view with jquery

2020-06-06 Thread mostwanted
Guys is it possible to clear a list in a view using jquery?
Something like this:

*CODE EXAMPLE:*
{{if details:}}
{{for details in details:}}

{{=details.first_name}}
{{=details.last_name}}
{{pass}}









*$(function(){$('#close').click(function(e){{{details.clear()}};});});*

How can I achieve this because?

Regards;

Mostwanted

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9831eef9-75ec-4c58-b86b-92f97d59e510o%40googlegroups.com.