![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 -------------------- |
![]() |
| Thread Tools | |
| Display Modes | |
| |