Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1458 How would you put the directory structure of a page at the top of a page (eg You are here: domain.com > directory > sub-directory > page.html?

You are here: irt.org | FAQ | JavaScript | Link | Q1458 [ previous next ]

Try:

<script language="JavaScript"><!--
thePath = '';
loc = '' +location.href;
paths = loc.substring(7).split('/');
for (i=0, n=paths.length;i<n;i++)
  thePath += '> ' + paths[i] + ' ';
document.write('You are here: ' + thePath.substring(1));
//--></script>

©2018 Martin Webb