6
I have this function below:
function consultarOcorrencia(number, sequence){
form = document.forms[1];
form.number.value = number;
form.sequencial.value = sequence;
form.submit();
}
After the 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");
}
It is possible that while the function is running, put a gif to load?
Like this:
This task can take up to 7 seconds.
A question, how to use this way in my Function ? thank you very much !
– Edson Cezar
@Edsoncezar, you can use at the beginning of your function?
– Gabriel Rodrigues
I can’t use ajax on this system, that’s a problem.
– Edson Cezar
@when you understand that the procedure is over ?
– Gabriel Rodrigues
Just with the return of Action, this is my problem.
– Edson Cezar
I put the example of Action in my question.
– Edson Cezar
@Edsoncezar sincerely I do not understand Java well and how you could solve this, I would particularly use ajax to in return hide, I do not indicate much what I will tell you now but if you know on average the time that this method will take to execute you can put a setInterval with the amount of time, but is not recommended...
– Gabriel Rodrigues
I did, using the function below, but thank you very much for your reply !
– Edson Cezar
@Edsoncezar Wonder, glad you could solve your problem ;)
– Gabriel Rodrigues
Thank you @Highlander
– Edson Cezar