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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify the previous page

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
US
Suppose page1 and page2 each have a button that loads page3. Is there a way for page3 to determine which of the 2 pages called it so we can then return to the previous page?
 
not with HTML, XHTML, nor CSS. You would use JavaScript for this. I assume you'd be adding a "back" button or some similar functionality.

Bring this to forum216.

 
Actually my question was structured wrong. So as to add some clarity, I do not want to return to the previous page. What I want to do is set some variables based on the previous page.

if previouspage = "page1" then
x = 1
else
x=4
end if
 
Depending on which server-side language you are suing there is such a thing as a Referrer. Which contains the referring address, but this of course falls outside the scope of HTML.

Try a forum for the server side language you are using:

forum434
forum333
forum855
forum232

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top