»
EnglishFrenchVietnamese

Print - Bread crumb script - JavaScriptBank.com

Full version: jsB@nk » Menu » Navigation » Bread crumb script
URL: https://www.javascriptbank.com/bread-crumb-script.html

Bread crumb script © JavaScriptBank.comThis script displays on any page a 'trail' (aka bread crumb) of where the viewer is currently at in relationship to the rest of the site. It does so by examining the directories that prefix the page, and displaying this containership (using links). If your site pages are organized using folders, this is a simple yet very useful navigation aid.

Full version: jsB@nk » Menu » Navigation » Bread crumb script
URL: https://www.javascriptbank.com/bread-crumb-script.html



HTML
<SCRIPT LANGUAGE="JavaScript"><!-- Begin//Bread crumb script - Kevin Lynn Brown//Duplicate directory names bug fix by JavaScriptKit.com//Visit JavaScript Kit (http://javascriptkit.com) for script  var path    = "";   var href    = document.location.href;   var string  = href.split( "/" );   for ( var i = 2; i < ( string.length-1 ); i++ ) {     link  = href.substring( 0, href.indexOf( string[ i ] ) + string[ i ].length );     path += "<a href='" + link + "/' target=_blank>" + string[ i ] + "</a>";     path += " | ";   }   i = string.length - 1;   link  = href.substring( 0, href.indexOf( string[ i ] ) + string[ i ].length );   path += "<a href='" + link + "' target=_blank>" + string[ i ] + "</a>";   document.writeln( path ); //  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->