multi-select
multi-select copied to clipboard
using ajax
HI Guys How does one use ajax to populate the select? Paige
You've probably sorted by now but here's how I did it using recursive:
$.ajax({
url: [YOUR URL],
type: "GET",
success: function (qx) {
var trHTML = '';
$.each(qx, function (i, item) {
$('#[SELECT ID]').multiSelect('addOption', { value: item.[FIELDNAME1], text: item.[FIELDNAME2] });
});
},
error: function () {
}
})
Thanx Dude,
On Tue, 03 Jul 2018 at 12:17, danverbiest [email protected] wrote:
You've probably sorted by now but here's how I did it using recursive:
$.ajax({ url: [YOUR URL], type: "GET", success: function (qx) { var trHTML = ''; $.each(qx, function (i, item) { $('#[SELECT ID]').multiSelect('addOption', { value: item.[FIELDNAME1], text: item.[FIELDNAME2] }); }); }, error: function () { } })
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lou/multi-select/issues/226#issuecomment-402094059, or mute the thread https://github.com/notifications/unsubscribe-auth/AD4UuJWpr52XIVjxxkKA5PycA2Spt5jGks5uC0TDgaJpZM4IKxx8 .
--
Mninawa+27 733039 541 You need to believe in your potential and power before you can bring them to life. You need to feel like you are extraordinary before you can become extraordinary. I call this "emotional blueprinting."