If you have more than one listboxes on your details or update user this code
<script>
// Function for selecting corresponding elements from the list box.
function select_ (){
// get listbox element
var o_els = new Array("EditRecordFIELDNAME","EditRecordFIELDNAME2","EditRecordFIELDNAME3");
for (var k=0; k< o_els.length; k++ ) {
var o_el = document.getElementById(o_els[k]);
// Enable multiselect for listbox
o_el.multiple="multiple";
// get listbox length
var len = o_el.options.length;
// get selected element
var selected = o_el.options[len-1].value;
// verify if selected element contains comas, if yes, do the following
if (selected.indexOf(",") != -1 ){
// Split selected option into array
var m_array = new Array();m_array=selected.split (",");
// Delete last option from the listbox
o_el.options.remove(len-1);
// Go through listbox and select each option, if it is present in array
for( var i=0; i< m_array.length; i++ ){for( var j=0; j< len-1; j++ ){
// Trim spaces while comparing elements from array and listbox
if( m_array[i].replace(/^s+|s+$/g, '') == o_el.options[j].value ){
o_el.options[j].selected = "selected";
}
}
}
}
}
}
// call select_ funtion when details page is loaded
window.onload = select_;
</script>