javascript - How to stop setInterval in a do while loop in jquery -


I want to, stop setting while the loop completes the position.

My problem is that even when the position of the loop is set by the interval it is still running.

  do {setInterval (Vinformation () ;, 500); } While ($ ('$ emailCodeResult'). Val ()! = '') Function WinNation () {var data = {}; Data.emailCodeResult = $ ('# emailCodeResult'). Val (); $ .Azax ({type: "post", url: "OPPAPPP."), Data: data, cache: incorrect, datatype: "Jason", success: function (result) {}}); return false; }  

  var itvl1 = window.setInterval (function () {Vinformation} ;}, 500); Function request () {var data = {}; Data.emailCodeResult = $ ('# emailCodeResult'). Val (); If (data.emailCodeResult! = '') {Window.clearInterval (itvl1); }; $ .ajax ({type: "post", url: "OPPAPP"), data: data, cache: incorrect, data type: "sends here", success: function (result) {}}; return false; }  

Comments

Popular posts from this blog

GO: Serve static pages -

Folder list php -

java - how to parse a JSON string into ObjectNode in Jackson? -