![]() Capt. Horatio T.P. Webb | VBScript MouseOvers Parks -- FALL 1999 Last Updated 10:00 AM 10/26/99 | |
Here is the VBScript code:
sub swp(mouse_action)
select case mouse_action
case "down"
document.images(3).src="buttondwn.gif"
case "up"
document.images(3).src="buttonup.gif"
case "click"
msgbox "You clicked the button!"
end select
end sub
and the code in the HTML for the "live" button:
<a name="stayhere">
<a href="" onMouseOver="swp('down')" onMouseOut="swp('up')" onClick="swp('click')">
<img src="buttonup.gif" border="0"></a>
Note -- you could use on MouseDown instead of onClick.
Note -- the "stayhere" is not required. It is used to keep the page from changing during the demo.