In my struts application, a user can download a file from the server.
I want to show a spinner during the time between the button click (to initiate the download) and fi
You can't do that using just client script, because there is no event for when the download completes.
Use struts2-jquery and give an Ajax call to getFile.action, same time u will have to use following tag-lib in order to make an Ajax call :
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
Add following line insider your head tag, also the hidden image tag.
..............
...............
Reference Link.