struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Neff <james.n...@tethyshealth.com>
Subject Re: [S2] Problem with list of submit buttons
Date Fri, 29 Aug 2008 16:43:01 GMT
Dave Newton wrote:
> --- On Fri, 8/29/08, James Neff wrote:
>   
>> <s:form id="myForm" name="myForm" 
>>         action="OriginalAction" theme="simple">
>>   <input type='button' onclick="myJavaScriptMethod();" 
>>          value='button label here'/>
>> </s:form>
>>
>> In the <head> section:
>> function myJavaScriptMethod() {
>>     document.myForm.action = "/myProject/NewAction.action";
>>     document.myForm.submit();
>> }
>>
>> And that is how I programmatically set different actions
>> from javascript.
>>
>> Is there a better way?
>>     
>
> You could use the "action" and "method" properties of <s:submit...> depending on
your app needs.
>
> Dave
>
>   

I learn something new every day from this list. 

Yesterday was about goats, and today it's about <s:submit  buttons.

Thanks Dave!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message