Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Scroll | Q555 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.