This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Javascript-- how to find referrer when url redirect is done Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript-- how to find referrer when url redirect is done" Watch "Javascript-- how to find referrer when url redirect is done" New topic
Author

Javascript-- how to find referrer when url redirect is done

Vishal Sinha
Greenhorn

Joined: Jul 17, 2008
Posts: 6
Hi,
I have 3 jsp pages...
Page1 is part of application1.
Page1 contains a anchor element which points to page2. Page2 redirects to page3 which is a part of different application, lets say application 2.
(page2 does response.sendRedirect(page3) to redirect to the application2).

My question is how can I find out url of page 2 on page 3 using javascript. Please note that document.referrer in javascript gives url of page1. Also I want to run javascript code only on page3

Any help regarding it will be appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60755
    
  65

You cannot do this reliably.

Why do you need to know where you came from? Perhaps a better way can be suggested.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript-- how to find referrer when url redirect is done
 
Similar Threads
template navigation problem
JSF Filter prevent direct access certain page
sendRedirect???
Handle session ID after deleting cookies
Pass data between managed/ backing beans