File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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: 61761
    
  67

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