In Domino, a Web page that has been refreshed (for instance with the @Command([ViewRefreshFields])) call, will be reloaded with an url ending with &Seq=n. The "n" will be a number indicating the number of times the page has been refreshed.
Pressing the browser's Back-button on such a page, will only result in the page showing up in the state it had prior to the latest refresh.
This is probably not what the user wants.
The user will probably want to go back to the page prior to the current page, no matter how many times the page has been refreshed.
The code below, put in a "Back"-button on the page, will solve the problem.
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 March 2001