You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by PEGASUS84 <pe...@hotmail.it> on 2009/02/23 11:44:00 UTC
back button
good moorning.
today my question is:"How to create a back button wirh struts 2?"
i used this code <s:submit value="Indietro"
action="javascript:history.back();"/>
but this metod don't operate.
Does someone help me?
--
View this message in context: http://www.nabble.com/back-button-tp22159144p22159144.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by PEGASUS84 <pe...@hotmail.it>.
but How can I realize this?
Antonio Petrelli-3 wrote:
>
> 2009/2/23 PEGASUS84 <pe...@hotmail.it>:
>>
>> Antonio se sei italiano potresti dirmi in italiano
>
> Translation (please do not answer here)
> Traduzione (non rispondere qui).
>
> Non lo fare, perché usare Javascript per tornare "indietro" ti porterà
> ad inconsistenze nella navigazione. Cosa succede se entri in quella
> pagina dall'esterno? E non dire che è impossibile perché, per la legge
> di Murphy, accadrà *sempre*.
> Di solito il problema si risolve individuando l'action dalla quale si
> proviene e usare quella invece di codice Javascript.
>
> Ciao
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/back-button-tp22159144p22512555.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by Antonio Petrelli <an...@gmail.com>.
2009/2/23 PEGASUS84 <pe...@hotmail.it>:
>
> Antonio se sei italiano potresti dirmi in italiano
Translation (please do not answer here)
Traduzione (non rispondere qui).
Non lo fare, perché usare Javascript per tornare "indietro" ti porterà
ad inconsistenze nella navigazione. Cosa succede se entri in quella
pagina dall'esterno? E non dire che è impossibile perché, per la legge
di Murphy, accadrà *sempre*.
Di solito il problema si risolve individuando l'action dalla quale si
proviene e usare quella invece di codice Javascript.
Ciao
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by PEGASUS84 <pe...@hotmail.it>.
Antonio se sei italiano potresti dirmi in italiano
--
View this message in context: http://www.nabble.com/back-button-tp22159144p22159702.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by Antonio Petrelli <an...@gmail.com>.
2009/2/23 PEGASUS84 <pe...@hotmail.it>:
>
> today my question is:"How to create a back button wirh struts 2?"
> i used this code <s:submit value="Indietro"
> action="javascript:history.back();"/>
Don't do it, since using Javascript code to get "back" will lead to
inconsistencies during the navigation: what if you stumble on that
page from an external website? Don't say it's impossible, because (for
the Murphy's law) it will *always* happen.
Usually this problem is resolved by identifying the action where you
are coming from, and using it instead of the "back" Javascript code.
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by PEGASUS84 <pe...@hotmail.it>.
thanks,
i'm successful using onclick="javascript:history.back();" instead using
action="javascript:history.back();"
Nils-Helge Garli wrote:
>
> I'm still not convinced... But did you try google?
>
> http://www.google.no/search?q=javascript+back+button
>
> Nils-H
>
> On Mon, Feb 23, 2009 at 11:59 AM, PEGASUS84 <pe...@hotmail.it> wrote:
>>
>> certainly;
>> but i must create a back button in a jsp page
>> but the tag submit with action=javascript:history.back(); doesn't work
>>
>>
>> Nils-Helge Garli wrote:
>>>
>>> Maybe you can explain what your requirement is. Your browser already
>>> has a back button ;)
>>>
>>> Nils-H
>>>
>>> On Mon, Feb 23, 2009 at 11:44 AM, PEGASUS84 <pe...@hotmail.it>
>>> wrote:
>>>>
>>>> good moorning.
>>>> today my question is:"How to create a back button wirh struts 2?"
>>>> i used this code <s:submit value="Indietro"
>>>> action="javascript:history.back();"/>
>>>> but this metod don't operate.
>>>> Does someone help me?
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/back-button-tp22159144p22159144.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/back-button-tp22159144p22159339.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/back-button-tp22159144p22159558.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
I'm still not convinced... But did you try google?
http://www.google.no/search?q=javascript+back+button
Nils-H
On Mon, Feb 23, 2009 at 11:59 AM, PEGASUS84 <pe...@hotmail.it> wrote:
>
> certainly;
> but i must create a back button in a jsp page
> but the tag submit with action=javascript:history.back(); doesn't work
>
>
> Nils-Helge Garli wrote:
>>
>> Maybe you can explain what your requirement is. Your browser already
>> has a back button ;)
>>
>> Nils-H
>>
>> On Mon, Feb 23, 2009 at 11:44 AM, PEGASUS84 <pe...@hotmail.it> wrote:
>>>
>>> good moorning.
>>> today my question is:"How to create a back button wirh struts 2?"
>>> i used this code <s:submit value="Indietro"
>>> action="javascript:history.back();"/>
>>> but this metod don't operate.
>>> Does someone help me?
>>> --
>>> View this message in context:
>>> http://www.nabble.com/back-button-tp22159144p22159144.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/back-button-tp22159144p22159339.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by PEGASUS84 <pe...@hotmail.it>.
certainly;
but i must create a back button in a jsp page
but the tag submit with action=javascript:history.back(); doesn't work
Nils-Helge Garli wrote:
>
> Maybe you can explain what your requirement is. Your browser already
> has a back button ;)
>
> Nils-H
>
> On Mon, Feb 23, 2009 at 11:44 AM, PEGASUS84 <pe...@hotmail.it> wrote:
>>
>> good moorning.
>> today my question is:"How to create a back button wirh struts 2?"
>> i used this code <s:submit value="Indietro"
>> action="javascript:history.back();"/>
>> but this metod don't operate.
>> Does someone help me?
>> --
>> View this message in context:
>> http://www.nabble.com/back-button-tp22159144p22159144.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/back-button-tp22159144p22159339.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: back button
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Maybe you can explain what your requirement is. Your browser already
has a back button ;)
Nils-H
On Mon, Feb 23, 2009 at 11:44 AM, PEGASUS84 <pe...@hotmail.it> wrote:
>
> good moorning.
> today my question is:"How to create a back button wirh struts 2?"
> i used this code <s:submit value="Indietro"
> action="javascript:history.back();"/>
> but this metod don't operate.
> Does someone help me?
> --
> View this message in context: http://www.nabble.com/back-button-tp22159144p22159144.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org