I need to disable a multi select picklist field (inputField) in the visualforce page on page load and enable it on button click.
I tried using javascript. It worked fine for other inputFields but did work out for multi select picklist field.
JS Code i used is below
function onPageLoad(){
document.getElementById('page:frm:pb:pbs:test').readOnly = true;
}
window.onload = onPageLoad;
function onEdit(){
document.getElementById('page:frm:pb:pbs:test').readOnly = false;
}