[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
It's best to handle on the client side if you can. The easiest is an IE conditional comment: !--[if IE] put some JS here that makes changes for IE -- it will be run only in IE browsers ![endif]-- You can also check via jQuery: if (jQuery.browser.msie) {do something} Finally, if you

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
That is great! Thank you both! I want to share my research about web2py + jQuery Mobile - made a lot of tests. The bottom line id as follows. JQuery Mobile is designed for mobile but it turns out it works on desktop too. This is great because one design can work for both mobile and desktop

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
I got response form jQuery Mobile developers and the answer is: The redirect issue isn't solvable until XmlHttpRequest2 see's better support and a redirect callback is added upstream in jQuery Core. If you are doing redirects on submission turning off ajax is really your only option. Now -

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
Maybe instead of a regular redirect, send back a regular 200 response with the Ajax request, and add a special response header with the redirect URL (e.g., response.headers['client_redirect'] = URL('other_function')). On the client side, have some JS code that runs upon successful Ajax

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
Do you think this simple solution will work? http://www.adequatelygood.com/2010/7/Saner-HTML5-History-Management

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
Don't know -- give it a try. On Monday, December 5, 2011 5:48:01 PM UTC-5, Constantine Vasil wrote: Do you think this simple solution will work? http://www.adequatelygood.com/2010/7/Saner-HTML5-History-Management

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
Your approach is better. On the client side, have some JS code that runs upon successful Ajax completion and looks for that header. How you would do that?

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
By the way I discovered jsbin - an easy way to publish html code, then got the source from browser bar just before it is rendered: http://jsbin.com/ojamak/4/edit here is where I hit submit: input data-ajax=false data-theme=e type=submit value=Sign Up / and I see: input name=_next type=hidden

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Anthony
You could use the jQuery ajaxSuccess event handler (http://api.jquery.com/ajaxSuccess/), and in the ajaxSuccess event handler, check for the special header via xhr.getResponseHeader('name-of-header'). From there, you'll have to figure out what to do, based on how jQuery Mobile works (I'm not

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-05 Thread Constantine Vasil
Thank you, Anthony, will check it.

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Constantine Vasil
The login is here: /user/login auth.settings.login_next = URL('default', args='index') I expect the address bar after redirection to show in routes.py routers = dict( BASE = dict( default_application = 'my_dev', default_controller='default' ), ) routes_in = (

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Anthony
Not sure it has anything to do with your problem, but you cannot mix the parameter based and pattern based rewrite systems -- if you're using routers, you cannot also use routes_in/routes_out (I think the presences of routers will cause routes_in/routes_out to be ignored). Regarding the

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Anthony
Note, you might consider asking about this in the jQuery Mobile forum: http://forum.jquery.com/jquery-mobile On Sunday, December 4, 2011 8:42:34 AM UTC-5, Anthony wrote: Not sure it has anything to do with your problem, but you cannot mix the parameter based and pattern based rewrite systems

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Constantine Vasil
I understand that now about not mixing routing. OK I am using routes.example.py default_application = 'my_app'# ordinarily set in base routes.py default_controller = 'default' # ordinarily set in app-specific routes.py default_function = 'index' # ordinarily set in app-specific

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Constantine Vasil
For the record - this was only an issue for IE desktop. I had to switch off ajax in jQuery and now it works. That means I have to make two different templates - one for IE, and one for everything else. Does web2py has a function to recognize if the browser is any IE browser?

Re: [web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-04 Thread Johann Spies
On 5 December 2011 05:55, Constantine Vasil thst...@gmail.com wrote: For the record - this was only an issue for IE desktop. I had to switch off ajax in jQuery and now it works. That means I have to make two different templates - one for IE, and one for everything else. Does web2py has a

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-03 Thread Alan Etkin
The address bar shows /user/login#/user/login I am using 1.99.3 dev version and cannot reproduce this behavior When i do login the resulting page shows the address without parameters and hitting the back button shows the old address. Have you customized the scaffolding app? Could you post

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-03 Thread Massimo Di Pierro
never seen this either. On Dec 3, 8:29 am, Alan Etkin spame...@gmail.com wrote: The address bar shows /user/login#/user/login I am using 1.99.3 dev version and cannot reproduce this behavior When i do login the resulting page shows the address without parameters and hitting the back button

[web2py] Re: How to make address bar to correspond to the _next link redirection? /user/login still shows after login

2011-12-03 Thread Constantine Vasil
I am using JQuery Mobile which is adding these hashes '#' after clicking on a link or Submit button. Cannot get rid of them no matter what. Also switched off ajax on the links.