[Javascript] java breadcrumbs

Harry Love hlove at u.washington.edu
Tue Oct 1 14:15:41 CDT 2002


<snip>
In this breadcrumb javascript... 
https://lists.latech.edu/pipermail/javascript/2002-August/004051.html

I do not want the domain name and the first 2 folders to show up in the
breadcrumbs because the main folder for this site is barried under those
2 folders.

if anyone can help let me know.
Thanks
Jeff
</snip>

Jeff,
The need to have a definable starting point for the breadcrumbs is on my
to-do list, but unfortunately I don't have time to work on it right now.
In the meantime, I can give you some hints for customizing it yourself.

The first part of the script gets the URL string from the browser and
splits it into segments using the backslash as a delimiter.  Those
segments are then stored in an array.  The rest of the script is all
about looping through the array segments and writing those segments to
the page.  I use if/else statements to find out if the segment is the
last segment, the beginning segment, or somewhere in the middle.  Then,
according to the segment's position in the array and the customization
options at the top of the script, each segment is written to the page.

So, what you'll have to figure out is how to keep the first three
segments of the array (array[0], array[1], array[2]) from being written
to the page.  You might use another if/else block and say something like
(in pseudo-code): 

If (this is the first segment or this is the second segment or this is
the third segment)
{
	do nothing;
}
Else
{
	do something;
}


I hope that gives you a good starting point.

Harry




More information about the Javascript mailing list