Login in redirect via AJAX request |
[eluser]Base Willy[/eluser]
Hi! I have a problem with logging in and then redirecting via ajax request which is made by Prototype.js Ajax.Updater. If login success I try to redirect via redirect() function, but it makes so that the page loads in the area where ajax request result is shown, not redirects the browser. So i try to redirect via javascript [removed].href='...' and then I have another problem - cache After redirect browser loads the page from cache and it looks like you didn't log in. Need some help ps: Using OB Session.
[eluser]Pygon[/eluser]
http://ellislab.com/forums/viewthread/63962/ covers preventing page caching. redirect() will not work correctly in your case.
[eluser]kylehase[/eluser]
ajax updater is designed to reload a div only so any response will only affect that div. I had the same problem. Check out this page for a good solution. http://forums.devshed.com/javascript-dev...46837.html It basically outlines two steps. 1) add an onComplete line to your ajax updater Code: var ajax = new Ajax.Updater( Code: function checkLogin(response)
[eluser]Base Willy[/eluser]
linuxamp, thanks for your hint but it doesn't solve the problem, sometimes in IE and Opera the page loads from cache and it's like you didn't login I've added no-cache headers to the view but even this doesn't help |
Welcome Guest, Not a member yet? Register Sign In |