Desmond.
A frequently used method is to put the following at the very top of
your HTML files (right after the <body> tag):
<a name="top"></a>
And this near the bottom of the page to go to the top:
<a href="#top">Go to the top of the page</a>
--
Kim André Akerø
- kima...@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
JavaScript way-
window.scroll(0,0)
Mozilla Link-http://developer.mozilla.org/en/docs/DOM:window.scroll
MSDN link-http://msdn.microsoft.com/workshop/author/dhtml/reference/
methods/scroll.asp
HTML-
...
<body ..>
<a name="top">Hello WelCome</a>
....
<a href="#top">Go to top ??</a>
Blank anchors are not valid.
Thanks that was simple. Des.
Java script has to be linked to a button or image right?
This would not work on a text line <a></a>
Desmond.
> Blank anchors are not valid.
They are. Try learning HTML before starting to besserwisser on it in public.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
> Can someone tel me how I put a link at the bottom of a page to send it
> to the top. Is this Javascript?
No, it is foolish (in almost all cases, and surely if you had to ask).
Technically, it would at the simplest be the following (pure HTML):
<a href="#">Start of the current page</a>
but the foolishness results from the fact that every browser has a builtin
function for moving to the start of the current page, such as the Home key.
And you surely did not intend even to hide the useless link in a print
stylesheet, so all those links would appear on paper too.
More info: http://www.cs.tut.fi/~jkorpela/www/totop.html
he he.. .you're right. sorry.
> Scripsit Desmond:
>
>> Can someone tel me how I put a link at the bottom of a page to send
>> it to the top. Is this Javascript?
>
> No, it is foolish (in almost all cases, and surely if you had to ask).
>
> Technically, it would at the simplest be the following (pure HTML):
> <a href="#">Start of the current page</a>
Doesn't work in Opera without named/ided receiver.
> but the foolishness results from the fact that every browser has a
> builtin function for moving to the start of the current page, such as
> the Home key. And you surely did not intend even to hide the useless
> link in a print stylesheet, so all those links would appear on paper
> too.
>
> More info: http://www.cs.tut.fi/~jkorpela/www/totop.html
Yes, I prefer the Home key, myself.
--
Neredbojias
He who laughs last sounds like an idiot.