back soft

مطالب مرتبط با «javascript using regex» (2 مطلب) در back soft | نویسنده: استخدام کار

Javascript - Using promise for post PHP, get undefined result

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] ...

ادامه مطلب

javascript to wrap specific text using regex capture but excluding html tag attributes

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 "...

ادامه مطلب

برچسب‌های مرتبط

javascript using | javascript using html | javascript using json | javascript using namespace | javascript using var | javascript using regex | javascript using variables | javascript using arrays | javascript using prototype | javascript using asp net