I need to gray a button in HTML using Javascript. I know how to enable/disable a button using Javascript. But, the requirement is to gray out the button as well in order to give a visual feedback to the user that the button is disabled. I am essentially looking at these options:
1) Changing background, foreground or any other attributes of the image tag - Simplest and most preferable
2) Changing the shades(R G B proportions) programmatically to give a feeling of graying out - this is fine if the first option is not possible.
3) Replacing the button with a different gif, which is a grayed out version of the former - Wouldn't prefer it, don't mind though if this is the only viable option.
I need some expert advice on how to about this. Any pointers are welcome.
Thanks in advance,
Ganesh
1) Changing background, foreground or any other attributes of the image tag - Simplest and most preferable
2) Changing the shades(R G B proportions) programmatically to give a feeling of graying out - this is fine if the first option is not possible.
3) Replacing the button with a different gif, which is a grayed out version of the former - Wouldn't prefer it, don't mind though if this is the only viable option.
I need some expert advice on how to about this. Any pointers are welcome.
Thanks in advance,
Ganesh