[jQuery] Select all items in list on form submit
Hi all,
I wonder if anyone can help. I have this bit of code that selects all
the items in a multiselect list box when the form is submitted.
$('#assignUsersForm').submit(function() {
$('#assignedUserList option').each(function(i) {
$(this).attr("selected", "selected");
});
});
It works perfectly in IE8, FF, safari and chrome but not IE7 & 6
Does anyone have any idea why or can anyone suggest alternative code.
Thanks, Richard
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home