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
60
WebImageButton does not change images after being enabled in Javascript
posted

I am trying to enable a webImageButton in Javascript when another control on the page is clicked.  The image button becomes enabled, but the button's image does not change from the disabled image.

 Here is my code:

 function enableButton()

{

   var img = document.getElementByName("ctl00$RightContentHolder$imgEdit").item(0);

   img.disabled = false;

}

Can anyone help me with the code to change the button's image?  I am lost!

 

Parents
No Data
Reply
  • 60
    posted

    Nevermind, I found this:  it works like a charm.

     

    function enableButton()

    {

         var img = ig_getWebControlById("ctl00_RightContentHolder_imgEdit")

         img.setEnabled(true);

    }

Children