Morley said:
Hi,
Does anyone know how to insert 'Bread Crumbs' in Microsoft FrontPage
2003. What I want to be able to do is offer visitors the chance to
see where they are in the website and be able to click back a page,
for example:
Home Page > Articles > Jayne Summers > Page 3
Does anyone have the answer??
Many thanks
Steve Morley
I use the function below, but I have been advised to check these lines as they are most likely incorrect
var cStyle = '75pc'
var tStyle = '75pc'
var dStyle = '75pc'
I will be trying % rather than pc
The function can be called by
<script type="text/javascript">breadCrumbs();</script>
function breadCrumbs()
{
// Were passed parameters
var base = 'tandcl.homemail.com.au'
var delStr = '>>'
var defp = 'index.html'
var cStyle = '75pc'
var tStyle = '75pc'
var dStyle = '75pc'
var nl = 0
// added
var localweb = 'myweb'
// ----------------
var loc, subs, a, i
//----Internal functions ---
function getLoc(c)
{
var k, d = ""
if (c > 0)
for (k = 0; k < c; k++)
d += "../"
return d
}
//--------------------------
function makeCaps(a)
{
var l, g = a.split(' ')
for (l = 0; l < g.length; l++)
g[l] = g[l].toUpperCase().slice(0,1) + g[l].slice(1)
return g.join(" ")
}
//-- End Internal functions --
loc = window.location.toString()
if (loc.indexOf('file') != -1)
base = loc.substring(0, loc.indexOf(localweb) + localweb.length + 1)
subs = loc.substr(loc.indexOf(base) + base.length + 1).split("/")
document.write
( '<a href="' + getLoc(subs.length - 1) + defp + '"'
+ ' class="' + cStyle + '">Home</a>'
+ '<span class="' + dStyle + '">' + delStr + '</span>')
a = (loc.indexOf(defp) == -1) ? 1 : 2
for (i = 0; i < (subs.length - a); i++)
{
subs
= makeCaps(unescape(subs))
document.write
( '<a href="' + getLoc(subs.length - i - 2) + defp + '"'
+ ' class="' + cStyle + '">' + subs + '</a>'
+ '<span class="' + dStyle + '">' + delStr + '</span>')
}
if (nl == 1)
document.write("<br>")
document.write
( '<span class="' + tStyle + '">'
+ document.title + '</span>' )
}
//------------------------------