Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q555 Is it possible to make buttons that scroll a frame up and down?

You are here: irt.org | FAQ | JavaScript | Scroll | Q555 [ previous next ]

Although the scroll method was introduced in Netscape Navigator 3, this only allows the document to be scrolled to a particular point in the document. The scrollBy method introduced in Netscape Navigator 4 and Internet Explorer 4 allows the document to be scrolled in increments:

<script language="JavaScript"><!--
if (document.layers || document.all) {
    document.write('<form>');
    document.write('<input type="button" value="Up" onClick="parent.frame2.scrollBy(0,-100)">');
    document.write('<input type="button" value="Down" onClick="parent.frame2.scrollBy(0,100)">');
    document.write('<\/form>');
}
//--></script>

©2018 Martin Webb