Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Previous Page


Message #1 by KATHLEEN.M.WHALEN@c... on Wed, 07 Mar 2001 17:24:11 -0500
     Thanks to everyone who sent me suggestions.
     The solution below from Danger worked the best.


______________________________ Reply Separator _________________________________
Subject: [html_code_clinic] Re: Previous Page
Author:  "HTML Code Clinic" <html_code_clinic@p...> at smtplink
Date:    3/7/01 9:30 PM


You're right, it's a JavaScript issue in one way.  You can use it like this:
     
define some funtions in a script header at top. 
<script language="JavaScript">
<!--
     
function Forward() {
  history.go(1)
}
     
function Backward() {
  history.go(-1)
}
// -->
</script>
     
then you're link looks like this:
<a href="javascript:Backward()> Click here to go backward </a>
     
and if you want you can use the Forward one similarly.
     
 - Danger
     
     
     
----- Original Message -----
From: <KATHLEEN.M.WHALEN@c...>
To: "HTML Code Clinic" <html_code_clinic@p...> 
Sent: Wednesday, March 07, 2001 2:24 PM
Subject: [html_code_clinic] Previous Page
     
     
>      I am designing a web page that contains a Navigation Bar down the
>      left.  I want to place a link in some of my pages that states "Move 
to
>      Previous Page".
>
>      My site map is as follows
>
>      index.asp
>         info.asp
>         moreinfo.asp
>      products.asp
>         abc.asp
>         xyz.asp
>      News.asp
>         today.asp
>         tomorrow.asp
>
>      My first thought was if I'm currently displaying "xyz.asp" then I can 
>      just insert the following link
>         <a href="products.asp">Return to Previous Page</a> 
>      This would return me to Products.asp (the parent page) 
>
>      However, it just occurred to me that index.asp might now always be 
the
>      most previous page.  It very well could be news.asp or index.asp 
>
>      So, my question is, how do I write code that will "remember" what the 
>      previous page is if it's not something I can pinpoint exactly?
>
>      Is this an HTML or a JavaScript issue? 
>
>      Thanks,
>      KMW


  Return to Index