You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Fernandes Celinio SGCF <Ce...@socgen.com> on 2008/08/14 16:34:32 UTC
how to disable the back button in Struts 1.2.3 ?
Hi,
I want to forbid the user to go back.
Javascript does not work in actions:
<script language="JavaScript">
window.history.forward(1);
</script>
Is there a way to disable the back button in Struts ?
Thanks
=========================================================
Ce message et toutes les pieces jointes (ci-apres le "message")
sont confidentiels et susceptibles de contenir des informations
couvertes par le secret professionnel. Ce message est etabli
a l'intention exclusive de ses destinataires. Toute utilisation
ou diffusion non autorisee interdite.
Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE
et ses filiales declinent toute responsabilite au titre de ce message
s'il a ete altere, deforme falsifie.
=========================================================
This message and any attachments (the "message") are confidential,
intended solely for the addressees, and may contain legally privilegedxi
information. Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any
of its subsidiaries or affiliates shall be liable for the message
if altered, changed or falsified.
=========================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to disable the back button in Struts 1.2.3 ?
Posted by Laurie Harper <la...@holoweb.net>.
Fernandes Celinio SGCF wrote:
> Hi,
> I want to forbid the user to go back.
>
> Javascript does not work in actions:
Well, obviously; Javascript runs on the client, actions run on the server.
> <script language="JavaScript">
> window.history.forward(1);
> </script>
>
> Is there a way to disable the back button in Struts ?
> Thanks
That code should work as you expect as long as it is included on the
page you want to disable the back button for. However, that's generally
a bad thing to do from a usability perspective; users expect their back
buttons to work unimpeded.
I would suggest re-examining the requirement that led you to disabling
the back button, and addressing it in a way that allows the back button
to function normally.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org