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);
Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
This was first published in January 2001