Non-scrolling previous/next buttons

Keep the previous and next buttons visible on the page.

Previous(@DbCommand("Domino"; "ViewPreviousPage")) and Next(@DbCommand("Domino"; "ViewNextPage")) buttons come handy when we need to limit the number of documents in an embedded view to be displayed on a single page. But then, shouldn't we stop scrolling of these buttons so that we could go to the next or previous screens anytime we want, without any scrolling up or down?

In your $$ViewTemplate form(with your embedded view) put the following code

<div id=waterMark style="POSITION: absolute; left:0px; top:30px; height:100px; width:780px; clip:rect(0,880,200,0)">

<!--Pass the above code through HTML-->

<!--Put your next and previous buttons here as hotspots preferably in a table and don't pass them through HTML-->

<!--Pass the code below through HTML-->

<SCRIPT language=JavaScript1.2>
markW = 122;       // pixels wide
markH = 403;       // pixels high
markRefresh = 20; // milliseconds

// set common object reference
if (!document.all) document.all = document;
if (! = 

wMark =;
wMark.width = markW;
wMark.height = markH;
navDOM = window.innerHeight; // Nav DOM flag
function setVals() {
 barW = 0; // scrollbar compensation for PC Nav
 barH = 0;
 if (navDOM) {
  if (document.height > innerHeight) barW = 20;
  if (document.width > innerWidth) barH = 20;
  } else {
  innerWidth = document.body.clientWidth;
  innerHeight = document.body.clientHeight;

   posX = 10;
   posY = 10;

function wRefresh() {
 wMark.left = posX + (navDOM?pageXOffset:document.body.scrollLeft); = posY + (navDOM?pageYOffset:document.body.scrollTop);

function markMe() {
        if (screen.width > 640 ) {

    markID = setInterval ("wRefresh()",markRefresh);

    window.onload=markMe; // safety for Mac IE4.5


<!--Embedd your view here-->

And you as scroll through the documents displayed in the embedded view, you can at any point of time access the next/previos button, because they don't scroll!!!!!

This was first published in October 2001

Dig Deeper on Domino Resources - Part 7



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...