0
When the data goes to Listbox I wanted it to be selected immediately: I don’t know why it didn’t work.
itensListBoxCatequizandos.append('<option value="' + obj.val + '"> ' + obj.name + '</option>').prop('selected', true);
0
When the data goes to Listbox I wanted it to be selected immediately: I don’t know why it didn’t work.
itensListBoxCatequizandos.append('<option value="' + obj.val + '"> ' + obj.name + '</option>').prop('selected', true);
0
Okay. I solved the problem:
$.each(myCheckboxes, function (i, obj) {
itensListBoxCatequizandos.append('<option value="' + obj.val + '"> ' + obj.name + '</option>');
$("select option[value=" + obj.val + "]").attr("selected", true);
});
Browser other questions tagged javascript jquery html
You are not signed in. Login or sign up in order to post.