Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

S:radio onchange call an action

hisameer

2010-04-13

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi,

I am having radio buttons in my jsp page with three selections:

(o) Login
(o) Returning user
(*) Register

Register is selected default. But if the user selects Login or Returning
User I want to call an action on the onchange event which has to do some
business logic and redirect the page to another one.Is it possible? I tried
but couldn't get it working. Here is the code:

<s:form id="test" action="usertypeAction" method="post" validate="true">
     <table width="100%" border="0" align="left" cellpadding="0"
cellspacing="2">
       <tr>
         <td class="contentheadertext" align="left" height="30px">&nbsp;</td>
       </tr>
       <tr>
         <td width="100%" colspan="2" class="contentheadertext" align="center">
           <s:radio name="userType" list="#session.userTypes" onchanage="Call the
related_user_action"/>
         </td>
       </tr>
                      ...
                      Some more code here
                      ...
</s:form>

on the onchange event I want to call related_user_action Action instead of
main form action: usertypeAction. so I am not able to use form.submit()
method on the onchange.

I only need help in the onchanage="Call the related_user_action" part since
I dont know how to achieve that. Please post your suggestions.

--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.