Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Previous URL 1

Status
Not open for further replies.

bjorna

Programmer
May 28, 2001
12
NO
How can I determine the complete URL for the previous page? I also need to find a way to determine if the user arrives from a page using http or https.

Bjorn
 
use the history object : and especially the "previous" property :
(this is copied/pasted from the url above, devedge's doc)
Description
The previous property reflects the URL that would be used if the user chose Back from the Go menu.
Examples
The following example determines whether history.previous contains the string "NETSCAPE.COM". If it does,
the function myFunction is called.
if (history.previous.indexOf("NETSCAPE.COM") != -1) {
myFunction(history.previous)
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top