Is there any way that I can do this?
Let's say you are on A page.
You clicked one link on A page to go to B page with querystring like this (B?wow=1234)
You are currently on B?wow=1234 page.
You press "BROWSER BACK BUTTON". It goes to A page, however, what I want to is that I want to redirect to "A?wow=1234", not just A page.
Obviously, there are couple of alternative ways like I can create a link on B page so that user can click that link instead. However, that's not possible option. Also, no use ActiveX or any third-party.
Minimum requirement is at least this should work IE & FF.
I can't think of any way.....I wasn't able to capture "Browser Back Button"...
Also I wasn't able to access history object value(I guess due to security reason)....referrer doesn't have value when pressing "Back button"..
You can create a sesssion cookie (a cookie without an expire date - it will disappear when the browser is closed) and check for it on A. If it doesn't exist, no URL parameter; if it does exist, place the url NVP (name value pair) as the value of the cookie and redirect to A?wow=1234.
That may work, but the problem is that....
on A page, on page load, you check cookie, and then redirect...which is going to be same A page with querystring...then ...again..it fires the event...redirect to that page...which will be redirecting to that page recursively...
So you include as part of the conditional to check for the indexOf "?" in document.URL; if it does not exist (==-1), redirect; if it does exist, do nothing.
Last edited by WolfShade; 06-17-2011 at 04:09 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread