struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathew, Manoj" <Mathew.Ma...@principal.com>
Subject RE: Multiple Actions
Date Tue, 27 Apr 2004 19:30:30 GMT



Hi

Can we call .do directly in the javascript fuunction with a request parameter.

<html:button property="start"	styleId="start"	value="start" onclick="postForm('startMyAction.do
?button=start')"	 /> 
<html:button property="refresh" styleId="refresh" value="refresh" onclick="postForm('startMyAction.do
?button=refresh')" /> 


function postForm(url) {
	document.forms[0].action = url;
	document.forms[0].submit();
	return true;
}

Let me know if this make any sense?

Matt
-----Original Message-----
From: Leticia Golubov [mailto:lgolubov@micromuse.com]
Sent: Tuesday, April 27, 2004 9:42 AM
To: Struts User Mailing List
Subject: Multiple Actions


My page has 2 buttons in one form. One is the 'start' button, another one is
a 'refresh' button.

I use <html:image> (wouldn't mind using <html:img>, but couldn't set a value
for my property with that tag) tag for the buttons. I was wondering how I
could get my action to determine which button was clicked and have the
forward subsequently use the right method in my action?

I've tried this:

<td><html:image page="../../images/button_toolbar_refresh.png"
		 border="0" alt="Refresh"
	   	 property="mode"
	   	 value="refresh"
		 onclick="myForm.submit();"
	 	 onmouseover="javascript:SwapImage
('refresh','../../images/button_toolbar_refresh_over.png');
SetStatus('Refresh'); return true;"
		 onmouseout="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh.png'); SetStatus(''); return
true;"
		 onmousedown="javascript:SwapImage
'refresh','../../images/button_toolbar_refresh_click.png');"

onmouseup="javascript:SwapImage('refresh','../../images/button_toolbar_refre
sh_over.png');" />
</td>

that will submit the action, but won't set the value...

please help?!

===========================================
Leticia Golubov
Precision Developer
Micromuse Ltd.
Disraeli House
90 Putney Bridge Road
London, SW18 1DA
Tel: +44 (0) 20 8875 9500 ext: 290

The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee.  Access to this email by anyone
else is
unauthorised.

If you are not the intended recipient delete
it from your system.  Any unauthorised
disclosure, copying, distribution or action
taken in reliance on this message is
prohibited and my be unlawful.
============================================


---------------------------------------------------------------------
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


Mime
View raw message