JQuery mobile – how to set the values of a multiple select?

I have a multiple select in jquery mobile.

docs:

http://jquerymobile.com/demos/1.0a4.1/docs/forms/forms-selects.html

To get the value I do this

    var leerplandoelen = $("#AddLessonForm_leerplandoelen").val();

        var leerplandoelenString = "";
        if(leerplandoelen != null){
            $.each(leerplandoelen, function(i, le){
                if(i!=leerplandoelen.length-1){
                    leerplandoelenString += """+le+"",";
                }else{
                    leerplandoelenString += """+le+""";
                }
            });
        }

To get a string like this “1″, “2″, “3″.

How can I set the values?

I tried the following:

    $(#AddLessonForm_leerplandoelen).val([3,6,14]).selectmenu(refresh);

But it didnt work.


Download jquery.mobile.how.to.set.the.values.of.a.multiple.select.zip
Direct Link


Download


Download jquery.mobile.how.to.set.the.values.of.a.multiple.select.zip
Mediafire


Download


Download jquery.mobile.how.to.set.the.values.of.a.multiple.select.zip
Badongo


Download


Download jquery.mobile.how.to.set.the.values.of.a.multiple.select.zip
Extabit


Download


Download jquery.mobile.how.to.set.the.values.of.a.multiple.select.zip
zshare


Download

Both comments and pings are currently closed.

Comments are closed.