javascript - iterating nested loops in Jquery asp.net -
I am working on a page in which I have two nested loops, my problem is ... say for example The outer loop is 1 and will execute 1times. And internal loop will execute 2times. Now when I alert the value of the external loop in the internal loop, then throws me on the first try .. I understand how it is 2, as my inner value is 1 and the condition is Anybody please help me completely I Stuck in. Your responses are back in ASCIN, so
. Html ("& lt; img width = '500' height = '35 'src =' / newsletter / section" + i + ".gif '& gt;"); Var rows = $ ("#divilft" + + + "TBI1 TD: Anth-Child (1)"); // has two lines (rows.label> gt; 0) {$ ("# tdSection" + i + "data"). Attachments ("& lt; Table id = 'tblSection" + i + "Data' & gt; & lt; / Table & gt;"); $ ("#tbesation" + + "data") Html (""); } {{.exx ({type: "post", url: "ajax methods. Espx / gatearticle dicks", data: "{'article id': '" + $ (this). Content type: "Jason", Content type: "Application / Jason", success: function (data) {var results = data d; alert ("$ (#tbblabel" + + + + + " Data ') "; // This gives me 2. warning (" $ (#tbblabel "+ index +" data') "); // it gives me 1 and 0. $ (" #telexation "+) + "Day ("& Lt; tr>
i async = false changes to
i and change the
index in sync (no configuration):
rows.each (function (index) {$ .ajax ({type: "POST", url: "AjaxMethods. Aspx / GetArticleDetails ", data:" {'articleId': '"+ $ (this) .text () +"'} ", Data type:" json ", async: false, // Here is the content type:" Application / Jayson ", success: work (data) {var results = data d; warning (" $ (#tbblack "" + + + "data") "; // This gives me 2. warning (" $ (# TblSection " + Index + "data ')"; // This gives me 1 and 0. $ ("#tbblabel" + + "data"). App ("& lt; tr & gt; & lt; td & gt; ; ++ [0]. Title: "Title:" "};}, Error: Function (Data) {Warning (Data.Propic Text);}}) }}
Comments
Post a Comment