I found this script on IRT.org and was wondering if someone could give me a had at describing the different parts of it. It works fine, but I want to to tweak it. I want to only display the directory that the file resides in and not the entire path - for example - the script below gives me c:\programs\microsoft\mail\text.html. What I would like to only show is the "mail" directory.
<script language="JavaScript"><!--
thePath = '';
loc = '' +location.href;
paths = loc.substring(7).split('/');
file = loc.substring(0,6);
for (i=0, n=paths.length;i<n;i++) {
file += "/" + paths[i];
thePath += '> <a href="' + file + '">' + paths[i] + '<\/a> ';
}
document.write('You are here: ' + thePath.substring(1));
//--></script>



Reply With Quote

Bookmarks