Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Javascrtipt to Change Button Color onClick Event

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Joined
Jan 26, 2001
Messages
522
Location
US
I have several buttons on my form which currently have call a Javascript for mouseover events to change the colors from one color to another color. All this works well. When the user clicks on one of these buttons, the following code is executed: autoExecute="True" requests_list="11"

This in turn calls a WebFOCUS program; and that works well.
What I need is for the button that was clicked to change color as well as call the WebFOCUS program.

I'm sure this is simple, but I am not a Javascript programmer.

Can someone please help?

Thanks,

Leo ;-)
 
This code will change a button's color to black and background color to white when clicked:
Code:
<input type="button" value="click me" onclick="this.style.color='#000000'; this.style.backgroundColor = '#ffffff'" />

-kaht

Looking for a puppy?

silky-icon-left.gif
[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
silky-icon-right.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top