I have this function below:
function consultarOcorrencia(number, sequence){
form = document.forms[1];
form.number.value = number;
form.sequencial.value = sequence;
form.submit();
}
After submit
, a Java Action is called.
@Override
public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws ApplicationException, SystemException {
MyForm myForm= (MyForm ) form;
MyDelegate.getInstance().cancel(myForm);
return mapping.findForward("cancel");
}
Is it possible that while the function is running, put a loading gif?
Like this:
This task can take up to 7 seconds.