Twoflower
08-28-2002, 04:00 PM
Greetings all.
My question is as follows. First of all, I am decently new at javascript, and therefore I don't know if what I want to do is possible. :o Anyway, here goes. I have a mouseover menu, each image having an "on" and an "off" counterpart, so that, (as it would be assumed) when mouseovered, the image change from the on to the off, and so on. This is fine, I have no problems with it. :cool: However, I was wondering if I could trigger another action with the same mouseover, IE to change another image not connected to the original at all. I am using a tag that looks something like this:
<A HREF="/link.html" onMouseover="imagechange('image1','image2')" onMouseout="imagechange('image1','image1')">
with the following code in the <head> section as a variable block (along with the rest of the script that I was told to use).
image1 = new Image;
image1.src = "image1.gif";
image2 = new Image;
image2.src = "image2.gif";
I was told that all I had to do for a mulitple action was to change the tag to :
onMouseover="action1 ; action2"
But so far I have yet to make it work :D Now, I may be a complete idiot and using the wrong code, etc., but any help would be great.
Thank you all ever so much,
Twoflower
My question is as follows. First of all, I am decently new at javascript, and therefore I don't know if what I want to do is possible. :o Anyway, here goes. I have a mouseover menu, each image having an "on" and an "off" counterpart, so that, (as it would be assumed) when mouseovered, the image change from the on to the off, and so on. This is fine, I have no problems with it. :cool: However, I was wondering if I could trigger another action with the same mouseover, IE to change another image not connected to the original at all. I am using a tag that looks something like this:
<A HREF="/link.html" onMouseover="imagechange('image1','image2')" onMouseout="imagechange('image1','image1')">
with the following code in the <head> section as a variable block (along with the rest of the script that I was told to use).
image1 = new Image;
image1.src = "image1.gif";
image2 = new Image;
image2.src = "image2.gif";
I was told that all I had to do for a mulitple action was to change the tag to :
onMouseover="action1 ; action2"
But so far I have yet to make it work :D Now, I may be a complete idiot and using the wrong code, etc., but any help would be great.
Thank you all ever so much,
Twoflower