JavaScript Code for





By Vic Phillips    http://www.VicsJavaScripts.org.uk

This utility uses a cookie to allow a visitor to track the pages they have visited
Links to visited pages are listed in a control panel.





Demonstration Panel
Demo Links Level 0 Page Level 1 Page
Float On Off
Position Top Right Bottom Right
Links Appearance In Line New Line
Collapse Paths Yes No

The Links are recorded for a specified duration.
A check box allows the panel to be maximised and minimised to specified heights.
Another check box allows recorded links to be deleted.
pv_Part1 variables allow the panel to be customised.
The panel has 'Drag' and 'Float' facilities


Bread Crumb

Simple Bread Crumb (what a silly name)
 

A simpler application of the cookie
but meets the basic navigation requirements.
The display panel is defined in the page HTML Code,
uses less JavaScript code but with less features
and the appearance customisation restricted to the HTML code.


The 'Previous Page' Script
The pv_Part1 Code including Application Notes.




The Code
The Code is in two parts
pv_Part1 Customising Variables
pv_Part2 Functional Code

The functional code 'pv_Part2' (about 7.5K) is best as an External JavaScript.
The customising variables 'pv_Part1' (typically 0.5K without notes)
may also be an External JavaScript if a common panel appearance is required.

The utility is initialised from a <body> onload event,
eg <BODY onload="pv_PageVisited()" >
and repositioned on the window resize event,
eg <BODY onload="pv_PageVisited();onresize="pv_ReSize();" >
The code includes a window onscroll event 'pv_ScrollTop(1);'
if customising variable "pv_Float='Yes';"

All variable, function etc names are prefixed with 'pv_'
to minimise conflicts with other JavaScripts.

The Cookie 'root' is the directory of the first page visited
the cookie can be accessed from all sub-directories of the 'root' directory.




Tested with IE6, and Mozilla FoxFire.





The 'Bread Crumb' Script
The bc_Part1 Code including Application Notes.




The Code
The Code is in two parts
bc_Part1 Customising Variables
bc_Part2 Functional Code

The functional code 'pv_Part2' (about 2.5K) is best as an External JavaScript.
The customising variables 'pv_Part1' (typically 0.5K without notes)
may also be an External JavaScript if a common panel appearance is required.

The utility is initialised from a <body> onload event,
eg <BODY onload="bcBreadCrumb('*Target*')" >
where
*Target* = the id name of the element to display the links (string).

All variable, function etc names are prefixed with 'bc_'
to minimise conflicts with other JavaScripts.

The Cookie 'root' is the directory of the first page visited
the cookie can be accessed from all sub-directories of the 'root' directory.




Tested with IE6, and Mozilla FoxFire.