Ensure you've included <s:head theme="ajax"> to include the required javascript and try turning on ajax debugging (<s:head theme="ajax" debug="true">). Ensure the javascript exists in your html.
See the top of http://struts.apache.org/2.x/docs/ajax-tags.html

Mansour wrote:
I am populating some fields that can be edited and saved. Trying to do this using ajax. The action is getting called but the form is never submitted, and the updated data is lost.


<table id="data_table" >
<s:form id="MyData" action="updateAccount" >
   <tr>
       <td>
           <s:label value="AccId:"  />
       </td>
       <td>
           <s:property value="acc.id"    />
           <s:hidden name="acc.id" value="%{acc.id}" id="acc.id" />
       </td>
   </tr>

   <tr>
       <td><s:label value="First Name"  /></td>
<td><s:textfield name="acc.firstName" value="${acc.firstName}" /></td>
   </tr>
</td>

</table>

<s:url id="ajaxSubmit" value="/updateAccount.action" />
<s:a theme="ajax" href="%{ajaxSubmit}" formId="MyData"> save </s:a>



Am I missing something ?





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to