• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Javascript? ASP?

D

digitalmelon

Guest
#1
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.
 
#3
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.
 
D

digitalmelon

Guest
#4
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? :)
 

madmatt

Bow Down to the King
Political User
#7
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

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,013
Latest member
Pdawgintown