...

View Full Version : Onmouseover Qustion



mbl
10-23-2004, 05:35 AM
Dear friends,

Is it possible to have something like this:

onmousover(do1, do2, do3) so that onmousover actions are separated by commas, or semicolons so do1, do2, do3 do different things? It'd be mouseover text.

Or:

Is it possible to have text-1 to be moused-over and have somehting like:

onmouseover text-1 (do1); {show photo2 at place 1}
onmouseover text-1 (do2); {show photo2 at place2)
onmouseover text-1 (do3); {write some text at textplace}
?

Thanks, if a simple example possible in case, would be appreciated.

-mbl-

Brandoe85
10-23-2004, 05:56 AM
If you mean can you do more than one thing with an onmouseover, yes you can...something like this would do two things on mouseover. Very general example but it just shows 2things onmouseover.


<head>
<script language="javascript">
function blah()
{
alert("mouseover 1");
}

function foo()
{
alert("mouseover 2");
}
</script>
</head>
<body>
<a href="#" onmouseover="blah(); foo();">Mouseover</a>
</body>
</html>


With images:


<html>
<head>
</head>
<body>
<img src="img1.gif" name="img1" alt="" border="0" onmouseover="document.img1.src='img2.gif'; document.img2.src='img4.gif';" onmouseout="document.img1.src='img1.gif'; document.img2.src='img3.gif'">
<img src="img3.gif" name="img2" alt="" border="0">
</body>
</html>

When you mouseover the first image, the first image will change and the second one will change also, then when you mouseout they will change back.

mbl
10-26-2004, 07:43 AM
Dear Brando,

Your help has been very good.

In particular, can use the second code given (for images). However, is there a way I could have instead of four images 1 and 2, do-away with images 3 and 4 have Text-1 and Tex-2 appear close to images 1 and 2?

So that imag-1 appears with Text-1 close to it.
Then, onmouseover image-1 is replaced by image-2, and
Text-1 is replaced by Text-2?

(If possible just modify the text you gave slightly? It was very clear, and use absolute text location, (could fix the location depending on image size) )

I have understood the original example well, but can't seem to put text as described. Have been trying for a few days.

Thanks a lot.

-mbl-



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum