multi-select icon indicating copy to clipboard operation
multi-select copied to clipboard

using ajax

Open mninawa opened this issue 8 years ago • 2 comments

HI Guys How does one use ajax to populate the select? Paige

mninawa avatar Apr 19 '16 14:04 mninawa

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 () {
        }
    })

ghost avatar Jul 03 '18 10:07 ghost

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

mninawa avatar Jul 03 '18 10:07 mninawa