Hi,
I would like to make a reset button redirect to an action, preferably
client side.
I've tried supplying an onclick attribute to the <html:reset> tag but I
can find no way of getting the full URL of the action without writing a
Java scriplet. Here's my best attempt so far:
<bean:struts id="resetForward" forward="Add" />
<html:reset titleKey="labels.addReset" property="reset" />
<script type="text/javascript">
function onReset() {
window.location = '<%= request.getContextPath() +
resetForward.getPath() %>';
}
document.Data.reset.onclick = onReset;
</script>
I'd be really grateful for any better ideas as this seems a bit nasty.
Something like <html:url action="/MyAction" /> would be lovely :).
Thanks in advance,
Matt
--
Matt Goodall
Analyst Programmer, Strategic Systems Solutions
e: [EMAIL PROTECTED]
t: +44 113 3892645
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

