Are you still looking for help on this? If so, please explain what more you 
need beyond the answer you accepted on Stack Overflow: 
http://stackoverflow.com/a/43682846/440323.

Anthony

On Thursday, May 11, 2017 at 6:51:34 AM UTC-4, mostwanted wrote:
>
> Please someone out there coz I'm pulling out my hairs at this point: 
>
> I want to extract pictures from within a list of elements extracted from 
> the database and store them inside a JavaScript array for a slide show. 
>
>
>  *CONTRLOLLER*
>
> def form1Details():
>   form=db.compForm(request.args(0))
>   forms=db(db.compFormPages.formName==form.id).\
>   select(db.compFormPages.ALL)
>   return locals()
>
> the images are in variable forms so i wanna display them in my view such
>  that each picture is stored individually inside a JavaScript array for a
>  slide show like below
>
>
> *VIEW*{{for pic in forms:}}
>  <script>
> function slideShow(){
> images = 
> ["{{=URL('download',args=pic.formImage)}}","{{=URL('download',args=pic2.formImage)}}"],"{{=URL('download',args=pic3.formImage)}}"];
> descriptions=['{{=pic.formTitle}}','{{=pic2.formTitle}}','{{=pic2.formTitle}}';..............................</script>}`
>
> How do I extract them individually to achieve whats in the view above so that 
> i can display all these images without 
> having to specify their count because the slide show sometimes shows 5 
> images and at times shows 3 images depending on what link the user 
> clicked and all these images are taken from different tables in the 
> database so the number of images is never standard, how do i cater for a
> different number of images displayed under varying user preferences 
> determined by the links they click???
>
> Please Help!!!! 
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to