> What dimension (in pixels) is a "short" page?
>
> If the browser window is resized by the visitor
> then the page may no longer be "short".
Short means to me, the page fits on the screen without scrollbars. It
makes no sense showing a top link in this case.
A long page means that the user has to scroll down to read everything,
causing the menu and navigation on top of the page to disappear. Users
want frames-websites, where navigation always stays on top. I have to
convince them not to use frames, and the 'top' link is one of my
arguments to drop the frames.
Regards
Peter
McKirahan - 31 Mar 2005 17:30 GMT
> > What dimension (in pixels) is a "short" page?
> >
[quoted text clipped - 12 lines]
>
> Peter
You didn't address my issue of resizing.
"Users want frames-websites ..." --
are you talking about your Users (or all Users)?
A small "top" image that may not always be applicable
is preferable to the use of scripting that may be disabled.
Another argument against frames is how the print!
RobB - 31 Mar 2005 20:38 GMT
> Hello
>
> I want to display a link on the bottom of a webpage to go to the top,
> but only if the user has to scroll down. If there's a small page,
this
> link has no use.
>
[quoted text clipped - 14 lines]
>
> It works on Internet Explorer, scrollHeight is bigger than
clientHeight
> with a long page.
> But not in firefox, scrollHeight = clientHeight in all cases.
[quoted text clipped - 3 lines]
>
> Peter
This may need some fine-tuning.
window.onload = function()
{
var bShow,
el,
dHt = self.innerHeight ? self.innerHeight :
document.documentElement
&& document.documentElement.clientHeight ?
document.documentElement.clientHeight :
document.body ? document.body.clientHeight : null;
if (dHt && 'undefined' != typeof document.body.scrollHeight)
{
bShow = (document.body.scrollHeight > dHt);
if (document.getElementById
&& (el = document.getElementById('img_totop')))
el.style.visibility = bShow ? 'visible' : 'hidden';
}
}