Arrow

Yongho Kim's Redirect to previous method | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Yongho Kim's Redirect to previous method
March 12, 2012
10:26 am
Andy P
Guest

Below is what was posted in the comments. Is there any way to upload this type of page from within WordPress without stripping out the JavaScript functionality. I need to do this but I do not have FTP or Cpanel access to the site I'm building.

Yongho Kim posted this in the plugin comments
this is my trick for making people go back to where they came from after the login:

1. Redirect to X page.
2. On X page, load up a javascript forcing the user to go back 2 pages (1 for the login page, and 2 for the original page)

My implementation was setting up a wiki page with securehtml enabled: http://krcla.org/blog/w-en/ind.....ction=edit

Let’s see if the code pastes properly here:
<html><script type="text/javascript">
function redirectIt() {
window.location.replace(history.go(-2));
}

window.onload = redirectIt;
</script></html>

March 26, 2012
2:18 am
globalreporter
Guest

Hi, can someone explain step by step how to create the page to go back in the history of the browser? I can't find the way to redirect users to the previous page... Thank you very much.

March 28, 2012
9:21 am
Yongho Kim
Guest

Andy P said:

Below is what was posted in the comments. Is there any way to upload this type of page from within WordPress without stripping out the JavaScript functionality. I need to do this but I do not have FTP or Cpanel access to the site I'm building.

In WordPress I believe you can paste pretty much any HTML or Javascript content in the content section while on the "HTML" tab (as opposed to the "Visual Editor" tab) and it should work.