Absolutely, you can create a form with hidden fields on the page that
POSTS its values to the server, or you can initiate an AJAX request
with the current page and store it server side in the session, or you
can simply write the current pre-login page out to a cookie, and have
the login page redirect based on the cookie information after they log
in.

On Dec 19, 3:16 pm, Vik <v...@mindspring.com> wrote:
> 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.

Reply via email to