Javascript? ASP?

D

digitalmelon

Guest
I'd like to create a "You are Here" idicator at the top of my web page that tells the user exactly where they are in the navigation tree of the site. For example it might look like this:

You Are Here>>> Home/About Us/Contact/contact.html

The user could click on Home, About Us or Contact to move back through the navigation structure. I see this done on a lot of sites. Is it done with Javascript? ASP?

Any help would be appreciated!

Thanks.
 
You could try something like:

<script language="javascript">
document.write(document.location.href);
</script>

This will write out the full URL, so it will look something like:
"http://www.somesite.com/directory/directory/page.html"

You'll have to paste the section above exactly where you want the text to appear.

You could the add some other code to cut out the first part so you are left with just the path and the page.
 
the problem with this solution is that the whole path is a url which takes me to the same page I am on. I would like to print the full path from the home page and have each one a link to that page.

Here is an example I found from another site:

Top -> PC Hardware -> Motherboards -> Socket A ->

Where each of these is a link back. Am I making any sense? :)
 
Its probably hard coded into each page
 
The method you are after is called breadcrumb navigation and it is quite common, its easiest to achieve in ASP by using an Include file to write that header in ..... if you want an example mail me .

MoOz Ownz OO
daniel.gwalter@btinternet.com
 
I would think doing something like that would be easiest accomplished using PHP and setting a global var, and when the page changes, update that var.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back