This tool used to display the path to the current page. There are three types of breadcrumbs: path, attribute, and location.
The script is as follow:
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>BreadCrumb</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <p align="left"> <script type="text/javascript"> <!-- Begin Hiding c_url = new String(); n_bytes = new Object(); var x = 0; var stop = 0; var output = '<a href="/">Main</a> >> '; c_url = location.href; c_url = c_url.slice(8, c_url.length); leftOver = c_url.indexOf('/'); c_url = c_url.slice( leftOver +1, c_url.length) while( !stop ) { leftOver = c_url.indexOf('/'); if (leftOver != -1) { n_bytes[x] = c_url.slice(0, leftOver); c_url = c_url.slice( leftOver +1, c_url.length) } else { stop = 1; } x++; } for ( var i in n_bytes ) { output += '<a href="'; for ( y = 1; y < x - i; y++ ) { output += '../'; } output += n_bytes[i] + '/">' + n_bytes[i] + '</a> >> '; } document.write(output + document.title); // Done Hiding --> </script> </p> </body> </html>



Reply With Quote

Bookmarks