Vote count: 0 I'm a newbie in JS and have a little to no knowledge about asynchronous program and promise. I have a problem in getting result from post PHP as written in this code: showModalLink = function(d, i) { $('#myModalLabel').text(d.source.name + ' - ' + d.target.name); $('#modalJum').text(d.jumlahlelangsama); var lelang = d.daftarlelangsama.split(", "); var lelangmodal = []; var promises = []; for (var i = 0; i < lelang.length; i++) { querystring = "select pemenang from lelang where id = " + lelang[i]; console.log(querystring); var queryobj = { query: querystring }; promises.push($.post('indikasi3modal.php', queryobj)); } Promise.all(promises).then(function(results) { if (results[i] ...
ادامه مطلبVote count: 0 I've got Regex targeting alpha-numeric strings that are product numbers (all will be CAP/number combinations of various lengths) wrapping these product numbers in bold tags for hundreds of generated HTML emails. This worked great to bold product numbers, but also captures random parts of URLs and hex colors in my HTML email's tags attributes. I've tried to exclude hex colors, and only include text after ">" and before "...
ادامه مطلب