PDA

View Full Version : help with document.referrer


shashgo
09-22-2002, 10:20 PM
Hello all,
Im designing a website where I want each page to display a trail of crumbs, that is all the pages that the user went through to get to the current one. It would look something like
Education->Universities->Professors


In other words, I want each page that is linked to, to be able to display the name of the page that referred to that page. I have tried using document.referrer, but I dont get anything.

What am I doing wrong and what should I do to make this work?

Please help

boywonder
09-23-2002, 01:01 AM
Typically bread crumb scripts are not written to display the pages you just came from, but the directory structure of the site... so you can dig into a certain area for instance, but then jump back out to various levels from the home page. Like Codingforums.com.

Although they are typically written on the server side, you can do it in javascript. this article has some info http://www.evolt.org/article/Breadcrumbs_in_Javascript/17/15480/

If I wanted to create a script that tracked (and listed as links) the previous three or so pages visited, I would pass the page urls through the query string and adjust that data at each new page. Is that what you want to do? Or is it the former?

shashgo
09-23-2002, 02:15 AM
Hi boywonder,


It is the latter that I want to do, to display a list of all th pages Ive been tbefore I linked to the current one. This would work like the list that they display in yahoo whenever you search for stuff and then navigate deeper and deeper.Also I want each of those crumbs to act like links so I can click on them to navigate back.

how do i do that?