Hey Leonel,

I tried that, when I ran the code that you suggested, web2py did not 
redirect to display_canvas,

Execution in the following order, with client_side=True:

1.    run display_canvas
2.    ajax call to display

and with, with client_side=False:

1.   run display_canvas
2.   ajax call to display
3.   redirect to display_canvas, which generates new html based on width, 
however this is not rendered in the browser but can be seen in the resposne 
of the ajax call. 

I saw some other posts on this topic, they say that it is best to use a 
redirect in javascript from the head of display. This works but I am not 
sure if this is the cleanest solution.

I suppose the better question is given the example of what I am trying to 
do what is the best way of accomplishing it in web2py.

Regards,

James

On Monday, January 19, 2015 at 1:26:30 PM UTC+10, Leonel Câmara wrote:
>
> Hey,
>
> For ajax calls you need to use: 
>
> redirect(URL('default', 'display_canvas', args=[screen_width]), 
> client_side=True)
>
>
>
>
>

-- 
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