[Javascript] Control the window

Glenn E. Lanier, II glenn_lanier at netzero.net
Wed Aug 30 09:22:15 CDT 2006


> From: Peter Lauri
> Sent: Tuesday, August 29, 2006 9:54 PM

> The only real reason for this is that I do not want them to 
> use the back
> button when the system have posted information, they then get 
> the "page has
> expired" message.
 
> How can I avoid this then? :)

Peter,

I use the following line in each of my pages -- seems to work cross-browser
(IE6/Netcape/Firefox) and is exactly what the client wanted (not that I like
it myself!).

window.history.forward(1);

It allows the back and immediately sets the visible page to the next one in
history. Great thing is even if they select the drop-down next to back and
go back 10 pages -- you see a slight flicker (on older (like mine) machines)
as it flips through to the current page.

--G




More information about the Javascript mailing list