Let's say a user visits my site, and takes an action that requires him to be logged in. I would like to:
- Take him to the login page - Automatically return to the page he started from after he logs in So I need to capture the current window.location, which is easy (var returnURL = window.location) and communicate it to my app. I can't use URL variables (e.g. ?returnURL=http://www.returnlocation.com), because I'm using CodeIgniter, so I need to pass the returnURL in a POST or REQUEST variable. Is there a way to do this? Thanks in advance to all for any info.