struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ehteshamul Haque <ehsho...@yahoo.com>
Subject Re: How to work with back button using javascript?
Date Mon, 02 Feb 2009 11:34:33 GMT


Dear Taj Uddin

You can try the code below,

 <s:form method="post" action="xyz" namespace="/a" >
    <s:submit type="button" value="Back"
 cssClass="btnNormalFixed" align="left"
 onclick="return goBack();" accesskey="B"
 onmouseover="this.className='btnNormalFixedHover'"
 onmouseout="this.className='btnNormalFixed'" />
 <s:form>

<script language="javascript">
function goBack()
{
history.go(-1);
return false;
}
</script>
----------------
Ehteshamul Haque


'A great man is not the one who never falls, but the  one who rises every time he falls'




--- On Mon, 2/2/09, taj uddin <tajuddin19@yahoo.com> wrote:

> From: taj uddin <tajuddin19@yahoo.com>
> Subject: How to work with back button using javascript?
> To: "struts2" <user@struts.apache.org>
> Date: Monday, February 2, 2009, 3:28 AM
> Hi,
> 
> In my application i tried using the back button with
> javascript but its not working and instead it was calling
> the action specified in the form tag.
>  IN Detail:
> <s:form method="post" action="xyz" namespace="/a" >
>    <s:submit type="button" value="Back"
> cssClass="btnNormalFixed" align="left"
> onclick="JavaScript:history.go(-1)" accesskey="B"
> onmouseover="this.className='btnNormalFixedHover'"
> onmouseout="this.className='btnNormalFixed'" />
> <s:form>
> 
> when i click the back button, it was not rendering the
> previous page..instead it was calling the xyz action. So,
> pls help me out in this issue.
> 
> 
> 
>       


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message