Thanks.
Dan Eyassu
On Mon, 17 Dec 2001, Andrea Papotti wrote:
> > I am trying to prevent a user from hitting the 'back' button on a browser
> > and resubmitting a form a second time. [...] I can't use any scripting of
> any
> > kind
>
> IMHO there is no way to avoid the back button (or the backspace key)
> whithout scripts...
>
> ...but you can put an hidden value and check the value for previous submit.
>
> ...you can also put these three lines in your 'default.vm' layout to prevent
> caching (so the browser tells the user that he/she it's going to resubmit
> the form)
>
> $data.getResponse().setHeader("Pragma", "no-cache") ## HTTP 1.0
>
> $data.getResponse().setHeader("Cache-Control", "no-cache") ## HTTP 1.1
>
> $data.getResponse().setHeader("Expires", "0") ## prevents
> caching at the proxy server, should be setDateHeader("Expires", 0)
>
>
> hope it's usefull for you
>
> Andrea
> ---- --- -- - - -- --- ----
>
> 'The Computer made me do it.'
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>