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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -