breadcrumb help needed

J

Jaap V

Hi,

I'm a total newbie at java, and I need some help adapting this little
breadcrumb script. I want it to NOT to show the domainname (it has to start
with the first subfolder) Is that possible? Can some adapt it for me if
possible, please?

TIA
Jaap
-------------
<script language="javascript">
function buildDepth(iterations)
{
var iterations=iterations-3;
var depthStr="";
for (i=0;i<iterations;i++)
{
depthStr=depthStr + "../";
}
return depthStr;
}
function buildBreadCrumbTrail()
{
var constituentFolders = new Array();
var currentURL = document.location.toString();
constituentFolders=currentURL.split("/");
var outputStr="";
for (count=2;count<(constituentFolders.length-1);count++)
{
outputStr=outputStr + " > <a href='" +
buildDepth((constituentFolders.length-count)+1) + "index.htm'>" +
constituentFolders[count] + "</a>";
}
document.write(outputStr);
}
</script>
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,099
Messages
2,570,626
Members
47,237
Latest member
David123

Latest Threads

Top