[Javascript] Dynamic Layers onMouseOver

Pietro Carubbi pcarubbi at libero.it
Wed Sep 4 16:07:44 CDT 2002


Hallo,

in my page I have layers on which texts are displayed when the mouse is over
some linked images.

These texts have their individual style, and I would like that this style
changes if the mouse is Over or is Out the linked images.

The elements of the page are:

1) The script in the HEAD containing the descriptions to be displayed
onMouseOver, like:

<SCRIPT LANGUAGE="JavaScript">
var description = new Array();
description[1] = "<a href=\"page1.htm\" class=\"hpLinks\">Linked
Title</a><HR align=left color=#0099ff SIZE=2 width=200><span
class=\"hpTables\">Dummy text: Id esse facile, quod neque legiones audeant
absente imperatore ex hibernis egredi, neque imperator sine
praesidio</span>";
description[2] ...
</SCRIPT>

2) The layers, like this one:

<td width="320" height="115" valign="top"><div id="left1"></div></td>

3) The rollover linked images, which onMouseOver display also the texts
(description#) in the layers, like this one:

<a href="page1.htm" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('name1','','images_index/01_.gif',1);
left1.innerHTML = description[1];"><img src="images_index/01.gif"
name="name1" width="94" height="69" border="0"></a>


There are then the classes of the stylesheet, that are assigned at (1) and
that I would like to make dynamic through the events onMouseOut and
onMouseOver at (3).

How is this possible?

Thank you in advance,

Bye,

Pietro




More information about the Javascript mailing list