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

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -