You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sharath karnati <ka...@yahoo.com> on 2009/08/07 16:03:11 UTC

Displaying loader image while calling AJAX request.

Hi All,
 
   Implemented AJAX request with below lines
 
     
<s:url id="ajaxComplaintLink1" includeParams="none">
       <s:param name="sort_by" value="%{'complaint_id'}"/>
       <s:param name="sort_order" value="%{other_order}"/> 
      <s:param name="request_type" value="%{'ajax'}"/> 
</s:url>

<s:a href="%{ajaxComplaintLink1}" cssClass="sort_header" theme="ajax" targets="div1" errorText="An error ocurred" loadingText="Loading...">
Complaint ID<img border="0" src="images/sort_${sort_order}.gif" /> 
</s:a>
 
When I select Complaint ID it is displaying 'Loading...' message and it is working fine. I'd like to add some loader image other than showing plain 'Loading...' message(just like using indicator), but I don't know how to do this? 
 
Can anyone please let me know how to add loading image for this component. I'm using struts2.0.11 version.
 
Thanks in advance.
 
Regards,
Sharath.