Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Add styleclass on a button when it is Enable/Disable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic
Author

Add styleclass on a button when it is Enable/Disable

Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
We have two different styleclass(commandExButton, commandExButtonDisabled). "commandExButton" class applies for all button. I wanted to apply "commandExButtonDisabled" class only when the button is disable.

Now all the time(Enable/Disable) the letters of the button are grey because the class "commandExButtonDisabled" does not remove when the button becomes Enable. . I am not sure how to remove commandExButtonDisabled class to disaplay the letters of the button white(commandExButton). I am using jquery for that. I would appreciate if someone can help me on this as I am new in jquery. Thank you very much.

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do not repost the same question: http://www.coderanch.com/t/494093/HTML-JavaScript/Change-color-button-when-it

Eric
 
jQuery in Action, 2nd edition
 
subject: Add styleclass on a button when it is Enable/Disable
 
Similar Threads
Change the color of a button when it is Enable/Disable
I want to submit the button but not refresh the page
Enable/Disable a Button
Color changes of a button shows in IE but not showing in Mozilla Firefox