javascript - Remove ajax loader image after page load -


I have a form with the required fields and when the submit button is clicked, the loader image appears. :

  jQuery (document) .ready (function ($) {{$ $ .getElementById ('form'). Onsubmit = function () {$ .getElementById ('submit') .style .display = 'block'; $ .getElementById ('loading2'). Style.display = 'block';}}} (document)); )};  

HTML:

  & lt; Input type = "submit" class = "button alt" onclick = "$ (\ '# loading)'. Show ();" Id = "place_order" />  

I am having this problem when there are no required field fields and the submit button is clicked, loader images appear and when the required field errors are displayed, the loader image still shows. is .

How do I stop displaying it?

I do not like you using JPYPE in this way,

I myself What do I do, to validate this form and post my own result with jquery, which means that everything is well controlled so that my code is like this:

 $ ('# formBtn') ($ function () ($ {"(" # is loading "). FadeIn (); // Use some validation here and the verification is passed to $ $ Code c Other work on the other line ("/ signup", $ ('# form'). Serialize (), function (), redirect to home page, or other tasks like showing a message}.) Failed (function () {// Submit to show a message} {/ code> 
) always (function () {$ ("# loading"). FadeOut (); })}}

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -