Manage Learn to apply best practices and optimize your operations.

JavaScript Back Code that Always Works

While editing a Domino document on the Web, you may have used refresh-formulas or JavaScript-refresh a number of times. The Domino server will, for each refresh, add a "Seq=x" to the url. This is, in itself, not a problem. The problem comes when users click your "Back"-button. If the code in your "Back"-button contains the standard window.history.go(-1), users will only back up to the state of the page previous to the last refresh, which is probably not what they want.

By using the code below, back will allways work.

 var curUrl = document.location.href; var ix = -1; var seqNum = 0; var seqPos = curUrl.indexOf("Seq="); if (seqPos != -1) { seqNum = curUrl.substring(seqPos+4, seqPos+7); ix = ix - seqNum; } window.history.go(ix);
This was last published in January 2001

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • 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 ...