Selecting multiple options onclick

this isn’t a WordPress thing, just an issue with your JS.

this:

jQuery("select[name^='post_author']").attr('selectedIndex',selected);

should be:

jQuery("select[name^='post_author']").val(selected).attr('selected','selected');