|
We got around the back button problem very simply. Each page contains a
hidden session-identifier (a 128-byte string) as an <input
type="hidden"...>
form field. Part of that string is a 5-digit 'screen counter', which is
incremented by the iSeries application each time it's called (so it
doesn't
refer to a a particular screen) and part of it is a 1-byte session status.
For each page, an onLoad() function checks the screen counter in the
session-identifier field against the screen counter field saved in a
cookie.
If the session-identifier screen counter is > the cookie screen-counter,
the
cookie is updated with the session-identifier screen counter value.
However,
if the session-identifier screen counter is <= the cookie screen-counter
(meaning the user pressed the back button), a screen-identifier session
status is set to 'R' (meaning 'refresh') and the page is auto-submitted.
The
iSeries application then simply refreshes the current screen that it
determines the user is on.
This works perfectly - if the user uses the back button (or indeed,
attempts
to go back multiple screens), their existing page is simply refreshed.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.