Create an index.html. We should not submit the form in the same window, instead we have to post the form to a iframe. What is my heat pump doing, that uses so much electricity in such an erratic way? Mobile app infrastructure being decommissioned, No Send Email Submit Action in Sitecore Forms Module, Clicking a single submit button submitting all the sitecore forms in the page. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. It also needs a CSS style display:none; Below the form, put this JavaScript: 1. You would need to change your selector to the form for that to work: $('#login_form').submit(function() { $('#gif').css('visibility', 'visible'); });  Demo. Normally We cannot display a loading image after submitting a form, because when we submit a form initially it sends request to the server and the loading is only because of the server response after uploading. How did the notion of rigour in Euclids time differ from that in 1920 revolution of Math? and hide this div again when yo get response from the server. Stack Overflow for Teams is moving to its own domain! You can give a select dropdown instead of an input option and change the image based on user choice. rev2022.11.14.43031. Here's how you'd use jQuery and that plugin: Let suppose on button click you  are calling ajax method, before ajax call show image and onComplete ajax method hide Stack Exchange network consists of 182 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. ~
   
 ~  And in java script on page load show that div containg loading image  ~~, submitting form then showing loading image by javascript. Above technique will reduce the Page Load time and it will do the major Database operation on Button click.  Connect and share knowledge within a single location that is structured and easy to search.  Now we will be going to see different ways of submitting form : onclick form submit by id For example,if the ID of your form is 'form_id', the JavaScript code for the submit call is document.getElementById ("form_id").submit ();// Form submission onclick form submit by class Should I use equations in a research statement for faculty positions? Instead of the default gray submit button, you may like to use an image.