I am using magento 1.9 version. After clicking save or any button then I want to show progress by ajax loader. I found a div having ID "loading-mask". If i will change its style display:none to block then it all working fine. But I want to change this after validation pass. Where should I can place this condition for proper result ?

document.getElementById("loading-mask").style.display="Block";

You can show the imagen when the form is submitted:

$j(function() {
     $j('form').submit( function() {
         alert("Something"); //do something else here
         //in your case
         $j("#loading-mask").show();
         return true;
     });
});

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.