gabriel forzano here… I hope I find you today well and happy…
Perhaps you can help… Just a quick web-authoring question…
My site… www.subtlethings.com is slowly growing, but my table of contents is long, and once one has gone below the bottom of the page, every time one returns they must find their place by scrolling down the page, often losing their place…
The Question… Is there a piece of code that will “place mark” the page position of last page visited, returning them to the same place on the table of contents that clicked on before?
I hope that’s clear enough for understanding, if not, ask, I will clarify…
Meanwhile… be well and happy… and thanks… gi
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
It's called the 'back button'
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
If you have access to php:
If you have this
Code: html
<a href='page1.php'>Link 1</a>
<a href='page2.php'>Link 2</a>
<a href='page3.php'>Link 3</a>
<a href='page4.php'>Link 4</a>
<a href='page5.php'>Link 5</a>
change it to this
Code: html
<a name='l1'></a><a href='page1.php?back=1'>Link 1</a>
<a name='l2'></a><a href='page2.php?back=2'>Link 2</a>
<a name='l3'></a><a href='page3.php?back=3'>Link 3</a>
<a name='l4'></a><a href='page4.php?back=4'>Link 4</a>
<a name='l5'></a><a href='page5.php?back=5'>Link 5</a>
and make your back button navigation link look like this
Code: html
<a href='linkspage.php#l<?= $_GET['back'] ?>'>Back</a>
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2793
I've been thanked 77 times.
Offline
travelagent wrote:
Northie wrote:
It's called the 'back button'
Smartass...
In both IE and FF, when you hit back, you go to the same part of the page.
If the users are going to be going forward several links then you can always use the javascript hitsoty -3 thing
Code: html
<a href="#" onClick="history.go(-1)">Back</a>
just change th -1 to however many steps back you want to go
I couldn't help but notice your NavLinks are so spread out, which forces people to scroll, so here's what I suggest:
This is just a partial list of your NavLinks that will tighten them up, so people won't have to scroll:
Code:
<a href="Seven.htm">seven subtle steps</A><br />
<a href="lymph-lymphatic-lymph-nodes-spleen.htm">lymphatic system</A><br />
<a href="Immune Basics.html">immune basics</a><br />
<a href="Skin-brushing.htm">skin brushing</A><br />
<a href="sugar-destroys-health.htm">sugar kills</A><br />
Notice I took out the "<p>" and "</p>" as you're not using that syntax correctly.
You can also place this short snippet of code should you desire, for visitors to know precisely where they're at on your site:
Code:
<script language="JavaScript">
<!--
thePath = '';
loc = '' +location.href;
paths = loc.substring(7).split('/');
for (i=0, n=paths.length;i<n;i++)
thePath += '> ' + paths[i] + ' ';
document.write('<font color="#ff0000"><b>You are here: ' +
thePath.substring(1)+'</b></font>');
//-->
</script>
| Never |



