Hi Folks,
I have a question about noting the number of jumps a user has made
through the various pages of a web application.
Say the entry page presents the user with a number of buttons that
can be clicked on to produce various lists and tables of data.
Each list or table can have drilldowns (i.e. a href) that will produce a more
detailed list for a specific item.
All in all,there are 4 levels of depth and at each level, no matter how deep,
there is always a button to allow the user to get back to the top level
with one jump. Up to now I've used the javascript "history.go(-#)" function
to do the return jump. I.e. if the user is at level three, then it's "history.go(-3)".
Since I didn't have enough time to write code to count the jumps, I just used 3
different php scripts to do the relevant jumps. If the user is at level 2, then
the php script that is
called will have the function as "history.go(-2)" whereas
if he's only one level deep, then it will be a copy of the
same script, but instead it will have the function as "history.go(-1)".
My question is: can anyone suggest a better, more elegant way to approach this
without having to use several copies of the same script with the only difference
being the number inside the round brackets?
thanks for any suggestions,
cheers,
Denis