You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Page <Bi...@DigitalGarden.com> on 2002/05/01 19:30:50 UTC
RE: How do I pass an ActionForward's path into a button's onclick
() h andler
you could just detect the kind of submit in your action and then if it's a
cancel, forward to the other action. But if I understand what you're
saying, you could just check the submit type and global forward from the
first action.
bp
> -----Original Message-----
> From: lindsay.hamoudi@bt.com [mailto:lindsay.hamoudi@bt.com]
> Sent: Wednesday, May 01, 2002 1:26 PM
> To: struts-user@jakarta.apache.org
> Subject: How do I pass an ActionForward's path into a
> button's onclick()
> h andler
>
>
> I have a form and it has a 'confirm' and a 'cancel' button.
> The 'confirm'
> button submits to the Action class. I'd like the 'cancel' button to
> redirect user to another Action, which has a global-forward
> named 'home'.
>
> Here's what I'm attempting...
>
> <html:submit property="irrelevant" value="Cancel"
> onclick="javascript:location.href='<html:rewrite forward="home"/>';"/>
>
> This does not work at all.
>
> Does anyone know how I could do this?
>
> Many thanks.
>
> Lindsay
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>