...

View Full Version : check if vertical scrollbar is present



wouter
01-18-2003, 01:42 PM
Is there a way to check if a vertical scrollbar is present?
The purpose is to place automatically a top-of-page link if the scrollbar is present - if no scrollbar is present no link will be placed.

Tx

Borgtex
01-18-2003, 04:36 PM
That works in IE (not tested in NS):



<script>
pg=document.body;
if (pg.scrollHeight>pg.clientHeight) document.write('top of page'.link('#'))
</script>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum