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 <tajuddi...@yahoo.com> wrote:

> From: taj uddin <tajuddi...@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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to