Javascript? ASP?

  • Thread starter Thread starter digitalmelon
  • Start date Start date
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.
 

scriptasylum

OSNN Senior Addict
Joined
25 Dec 2001
Messages
832
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
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? 🙂
 

Khayman

I'm sorry Hal...
Political Access
Joined
6 Jan 2002
Messages
5,518
Its probably hard coded into each page
 

Mooz

Moozically Con~foozed
Joined
16 Jul 2002
Messages
126
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
 

madmatt

Awesome is as awesome does.
Political Access
Joined
5 Apr 2002
Messages
13,314
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

Xie Electronic Punk 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 Sazar 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.
Terrahertz Electronic Punk Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk Sazar Electronic Punk wrote on Sazar's profile.
Where are you buddy?

Forum statistics

Threads
62,017
Messages
673,508
Members
5,637
Latest member
deniable
Back