Copy link to clipboard
Copied
If a non-logged in user is looking at forums topics and finds one they want to comment on. They are asked to log in but are jumped into the general secure zones user area. How can you have them return to the forum topic they were on? I have used a hack to give them a button to return to the page they were on but it only works 50-50 as the trick goes back to a page in a state before they were logged in so the browser doesn't always see them as logged in.
My litte button script is below that just uses the browser history. Any help would be great.
I heard there is a tutorial in bcgurus i might look at later but if there is anything out there besides that I am all ears.
<h2>Retun to the Page I was at.</h2>
<script>
function goBack()
{
window.history.go(-2)
}
</script>
<p><button onclick="goBack()">Go Back</button>Go back to where you were when you logged in. </p>
Copy link to clipboard
Copied
Does anyone have any advice for this? So far not having any luck.