Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

goto top

0 views
Skip to first unread message

Desmond

unread,
Mar 19, 2007, 1:22:40 PM3/19/07
to
Can someone tel me how I put a link at the bottom of a page to send it
to the top. Is this Javascript?

Desmond.

Kim André Akerø

unread,
Mar 19, 2007, 1:34:42 PM3/19/07
to
Desmond wrote:

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)

scripts...@gmail.com

unread,
Mar 19, 2007, 1:36:51 PM3/19/07
to

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>

scripts...@gmail.com

unread,
Mar 19, 2007, 1:39:19 PM3/19/07
to
On Mar 19, 11:34 am, Kim André Akerø <kiman...@NOSPAMbetadome.com>
wrote:

> 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>

Blank anchors are not valid.

Desmond

unread,
Mar 19, 2007, 1:45:21 PM3/19/07
to
On 19 Mar, 17:34, Kim André Akerø <kiman...@NOSPAMbetadome.com> wrote:
> Desmond wrote:
> > Can someone tel me how I put a link at the bottom of a page to send it
> > to the top. Is this Javascript?
>
> > 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ø
> - kiman...@NOSPAMbetadome.com

> (remove NOSPAM to contact me directly)

Thanks that was simple. Des.

Desmond

unread,
Mar 19, 2007, 2:04:03 PM3/19/07
to

Java script has to be linked to a button or image right?
This would not work on a text line <a></a>

Desmond.

Jukka K. Korpela

unread,
Mar 19, 2007, 2:53:46 PM3/19/07
to
Scripsit scripts...@gmail.com:

> 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/

Jukka K. Korpela

unread,
Mar 19, 2007, 2:58:20 PM3/19/07
to
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>
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

scripts...@gmail.com

unread,
Mar 19, 2007, 3:05:21 PM3/19/07
to
On Mar 19, 12:53 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
> Scripsit scripts.cont...@gmail.com:

>
> > Blank anchors are not valid.
>
> They are. Try learning HTML before starting to besserwisser on it in public.
>


he he.. .you're right. sorry.

Neredbojias

unread,
Mar 20, 2007, 5:06:55 AM3/20/07
to
On Mon, 19 Mar 2007 18:58:20 GMT Jukka K. Korpela scribed:

> 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.

0 new messages