Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
500
Reset CurrentValue of WebDropDown Using Javascript
posted

Hi,

I am trying to reset a WebDropDown's currently displayed value using javascript. If the user clicks a checkbox I want to reset the value showing in the webdropdown to the words "Select items". I a using set_currentValue but it does not change what is displayed on the page. Here is my code,

function disableWDD(sender, eventArgs) {
            if (document.getElementById("<%=chkSrchField.clientID%>").checked) {
                    document.getElementById("<%=wddMyWDD.clientID%>").disabled = true;
                    document.getElementById("<%=wddMyWDD.clientID%>").set_currentValue = "Select items";
             
            
             It goes through this code but the displayed value does not change to "Select items". What am I doing wrong? Thank you.
       

Parents
No Data
Reply Children