javascript - Read Only asp drop down list -
i'm working on asp.net app
i have drop down that, under conditions, should 'read only', is, user can't change but, on post selected value can read.
now know readonly attribute not available drop downs i'm trying build method simulates this
so wanted make javascript function doesnt let user 'open' drop down select item. possible?
here's example
function makedropdownreadonly(dropdownid, makereadonly){ var mydropdown = document.getelementbyid(dropdownid); if(makereadonly){ //block drop down } else{ //unblock drop down } }
tks
make disabled in form submit (using javascript) enable again value sent server.
sample code enable upon submitting:
document.getelementbyid("<%=dropdown1.clientid%>").disabled = false;
Comments
Post a Comment