Articles tagged with redirect
Redirects with Ajax
Redirects with Ajax are not really simple to do. When you redirect within the same controller, you can use setAction() instead but what if you want to redirect to another controller? I figured out a quite simple way using sessions, postet it - and got back the IMHO perfect solution by gwoo.
[Read more] Validation in another controller
You have 2 controllers, posts and comments, you want to be able to have a form on a posts view which submits to the comments controller, which does its thing then redirect to referrer - easy! BUT you also want the validation errors (if any) to display on the posts view - but currently they get lost when your redirect. Heres how to get around it!
[Read more] Tracking navigation history of a user
Many times it can be very useful to track the navigation history of a user. Especially if you want to redirect the user to a page where he came from after some action (e.g. login). With this HistoryComponent, it's extremely easy to handle such actions.
[Read more] Force login on Ajax requests
Users often encounter situations when they want to perform an action on a web site and get redirected to login page. Application’s task is to take care of performing the requested action right after user’s successful log in. It is easy job, unless the action is requested via ajax.
[Read more]
Latest Comments