Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Keeping Track Of User Navigation For Titles
Suppose you have a site structure that looks like this:

|--Countries.asp
|      |
|--Region.asp
|      |
|--Cities.asp
|      |
|--Population.asp

You start at the Countries page with a list of Countries.
If you click on UK, the site would take you to the Region
page and display the following at the top:

UK

This would give some context to the list of regions the
user was looking at.  If the user then clicks Midlands to
view Cities in the Midlands.  The Cities page would
display:

UK > Midlands

To give a context to the list of cities.  Then if the user
clicked Birmingham to view population data I'd want the
following at the top of the population page:

UK > Midlands > Birmingham

I've been trying to do this by creating a session variable
in the countries page, and just adding to it as I go
along.  However I've just discovered a major flaw with
this approach.  If I click the back button and then
refresh, I end up with something like this:

UK > Midlands > Birmingham > Midlands

Which is obviously wrong.  To compound matters the user
could go from Countries directly to population, so it'd
need to read:

USA > Population

Or they could goto population from region, ie:

USA > East Coast > Population

In this situation, how could track the movements of the
user to correctly display navigation information?

TIA

Colin

Report this thread to moderator Post Follow-up to this message
Old Post
Colin Steadman
09-29-04 08:55 PM


Re: Keeping Track Of User Navigation For Titles
use a separate session variable for each level in your hierarchy.


--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Colin Steadman" <anonymous@discussions.microsoft.com> wrote in message
news:161a01c4a626$f86ba9f0$a601280a@phx.gbl...
> Suppose you have a site structure that looks like this:
>
>   |--Countries.asp
>   |      |
>   |--Region.asp
>   |      |
>   |--Cities.asp
>   |      |
>   |--Population.asp
>
> You start at the Countries page with a list of Countries.
> If you click on UK, the site would take you to the Region
> page and display the following at the top:
>
> UK
>
> This would give some context to the list of regions the
> user was looking at.  If the user then clicks Midlands to
> view Cities in the Midlands.  The Cities page would
> display:
>
> UK > Midlands
>
> To give a context to the list of cities.  Then if the user
> clicked Birmingham to view population data I'd want the
> following at the top of the population page:
>
> UK > Midlands > Birmingham
>
> I've been trying to do this by creating a session variable
> in the countries page, and just adding to it as I go
> along.  However I've just discovered a major flaw with
> this approach.  If I click the back button and then
> refresh, I end up with something like this:
>
> UK > Midlands > Birmingham > Midlands
>
> Which is obviously wrong.  To compound matters the user
> could go from Countries directly to population, so it'd
> need to read:
>
> USA > Population
>
> Or they could goto population from region, ie:
>
> USA > East Coast > Population
>
> In this situation, how could track the movements of the
> user to correctly display navigation information?
>
> TIA
>
> Colin



Report this thread to moderator Post Follow-up to this message
Old Post
Mark Schupp
09-29-04 08:55 PM


Re: Keeping Track Of User Navigation For Titles
setup a hierarchy, store it wherever (db, xml, text, etc).
Then on each page have an ID that coresponds to a level in this hierarchy
(1,2,3,(n))
When you build the display of each page, look up this page's value and write
the hierarchy to that point.


--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"Colin Steadman" <anonymous@discussions.microsoft.com> wrote in message
news:161a01c4a626$f86ba9f0$a601280a@phx.gbl...
> Suppose you have a site structure that looks like this:
>
>  |--Countries.asp
>  |      |
>  |--Region.asp
>  |      |
>  |--Cities.asp
>  |      |
>  |--Population.asp
>
> You start at the Countries page with a list of Countries.
> If you click on UK, the site would take you to the Region
> page and display the following at the top:
>
> UK
>
> This would give some context to the list of regions the
> user was looking at.  If the user then clicks Midlands to
> view Cities in the Midlands.  The Cities page would
> display:
>
> UK > Midlands
>
> To give a context to the list of cities.  Then if the user
> clicked Birmingham to view population data I'd want the
> following at the top of the population page:
>
> UK > Midlands > Birmingham
>
> I've been trying to do this by creating a session variable
> in the countries page, and just adding to it as I go
> along.  However I've just discovered a major flaw with
> this approach.  If I click the back button and then
> refresh, I end up with something like this:
>
> UK > Midlands > Birmingham > Midlands
>
> Which is obviously wrong.  To compound matters the user
> could go from Countries directly to population, so it'd
> need to read:
>
> USA > Population
>
> Or they could goto population from region, ie:
>
> USA > East Coast > Population
>
> In this situation, how could track the movements of the
> user to correctly display navigation information?
>
> TIA
>
> Colin



Report this thread to moderator Post Follow-up to this message
Old Post
Curt_C [MVP]
09-29-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:41 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.