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
150
Change Image on Disable Button
posted

Hi good morning,

I need chage automatically de color of WebImageButton, with JavaScript. When I disable the Button he is disable and not is posible put, but the image not change the color in grey modus.

Is posible that Image change automatically without I modify the file .png.

Best Regards.

  • 23953
    Verified Answer
    Offline posted

    Hello David,

    If you're using images for your button look and feel then you need to supply also disabled image. Having set the correct images in place then the WebImageButton will correctly swap the images when you use its CSOM setEnabled API like this:

    ig_getWebControlById("WebImageButton1").setEnabled(false);

    In any case the WebImageButton applies "color:gray;" CSS style to the button text.

    Hope this helps,
    Martin Pavlov
    Infragistics, Inc.