Hello Web2py Community!  For the past week I have been struggling to get 
URL redirection working when calling views that use jQuery Mobile in 
Web2py.  

It turns out the problem is with JQM and is described here: 
https://github.com/jquery/jquery-mobile/issues/2427 and also here 
https://github.com/jquery/jquery-mobile/issues/6842 the poster is using 
PHP, but this is also an issue in Web2py. Here is some Web2py code to 
illustrate the problem and solution.

if form.process().accepted:
    redirect(URL(....))  #<--- this does not redirect when using JQM
*    redirect(URL('....'),client_side=True)  # "client_side" parameter is 
necessary for redirects when using jquery-mobile*


-Rob

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

Reply via email to