frontpagecustoms.com said:
Thanks for the feedback. I tried that resources however could not get
it to work. Any other sugguestions?
mark
The breadcrumb function I use is below
base is your home site name
defp is the home file
I call it by
<div align="left" id="bcrumbs">
<script type="text/javascript">breadCrumbs();</script>
</div><br />
at the top of each page. (This is actually done by an include.)
function breadCrumbs()
{
// Were passed parameters
var base = 'tandcl.homemail.com.au'
var delStr = '>>'
var defp = 'index.html'
var cStyle = 'sz16'
var tStyle = 'sz16'
var dStyle = 'sz16'
var nl = 0
// added
var localweb = 'myweb'
var bc_text = ''
// ----------------
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("/")
bc_text
= '<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))
bc_text
+= '<a href="' + getLoc(subs.length - i - 2) + defp + '"'
+ ' class="' + cStyle + '">' + subs + '</a>'
+ '<span class="' + dStyle + '">' + delStr + '</span>'
}
if (nl == 1)
bc_text += "<br>"
bc_text
+= '<span class="' + tStyle + '">'
+ document.title + '</span>'
document.getElementById("bcrumbs").innerHTML = bc_text
}
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------