PDA

View Full Version : Multiple mouseover actions


robbroy
12-27-2002, 10:44 PM
I am trying to combine into a single script two mouseover scripts.

My objective is to make an onmouseover script that will both (a) change the gif of a URL-linked button and replace with my mesage the URL that appears in the status bar.

Script 1 is a hyperlinked button with mouseover image effect:

<head>

omitted

</head>

<body>

<!--HTML Button-->
<a href="http://www.help.com" target="_self" onmouseover="lighten('name0')" onmouseout="darken('name0')" onmousedown="darken2('name0')" onmouseup="darken('name0')"><img src="/path to images/image1.gif" name="name0" alt="Get Help Here" border="0"></a>

</body>


Script 2 is a status bar onmouseover text changer:

<body>

<a href="www.help.com" target="_self"
onmouseover="window.status='Get Help Here';return true;"
onmouseout="window.status=''">Help</a>

</body>

The two scripts work separately but will not work together, I believe because of the (a) duplicate onmouseover commands, and (b) a conflict in mouseover action.

I am trying to add the action of script 2 to the body of script 1.

No matter how I amend the script 1 code to include the script 2 action, I blow the code. Unfortionately, I am not well enough versed in js to properly combine actions here.

Any help would be appreciated.

Thanks,

This is a great forum.

Borgtex
12-27-2002, 11:46 PM
use ";" as you would do in a normal script:


onmouseover="lighten('name0');window.status='Get Help Here'"

robbroy
12-28-2002, 05:13 PM
Thanks a lot.

:)