I have a big red button and I'm trying to use javascript to perform the following: -
I can get the onMouse Down and onMouseUp image changes part to work.
I can also get the hidden div to reveal by using OnClick
The problem is I can't get it all to work together.
How do I do this?
BTW, I'm sure its obvious, but I'm fairly new to javascript, so I appreciate your help
You can use semicolons to separate multiple script statements in an event:
<img src="..." alt="..."
onmousedown="depressed();"
onmouseup="undepressed(); revealDiv();" />
Also, I believe most browsers support the onclick event:
<img src="..." alt="..."
onmousedown="depressed();"
onmouseup="undepressed();"
onclick="revealDiv();" />
Since you said you had already figured out each of the 3 parts separately, I just wrote function calls that you can replace with your own code for each step.