Somes problems with Layers and JavaScript

H

HD

Hi,

I've a picture in a Layer (div). I would like locate a second layer
according as the location of the first layer.

Like that anywhere the location of the first layer, the second is always on
the same location over the first layer.

I've a marriage photography and I want have a circle over the figure I want
when I locate the mouse-cursor over a link (the name of the figure I want).

I've experiment to do the script but it won't take the location of the first
layer...

(excuse my english...)

<HEAD>
<script language=javascript>
var layer;
var layerimg;
var dx;
var dy;
function Init () {
document.onmousemove=ie;
}
function FSee (name,dy,dx) {
layer = document.getElementById(name).style;
layerimg = document.getElementById("mariaj").style;
layer.top = dy+layerimg.top+"px";
layer.left = dx+layerimg.left+"px";
layer.visibility = 'visible';
}
function FHide (name) {
layer = document.getElementById(name).style;
layer.visibility = 'hidden';
}
Init();
</script>
</HEAD>
..........
and
..........
<div id="circle" style="position:absolute; z-index:2; visibility:hidden;">
<img src="circle.gif">
</div>
<MAP NAME="Mariage">
<AREA SHAPE=RECT COORDS="399,267,455,483" HREF="#" ALT="Marcel Jules">
<AREA SHAPE=RECT COORDS="339,287,386,491" HREF="#" ALT="Louise Estelle">
<AREA SHAPE=RECT COORDS="468,272,522,481" HREF="#" ALT="Marie Lucie">
<AREA SHAPE=RECT COORDS="529,277,581,485" HREF="#" ALT="Charles Jules">
<AREA SHAPE=RECT COORDS="261,274,323,482" HREF="#" ALT="Élizée">
<AREA SHAPE=RECT COORDS="193,285,258,485" HREF="#" ALT="Marie Julia
Estelle">
<AREA SHAPE=RECT COORDS="225,215,269,284" HREF="#" ALT="André Charles Lucien
">
<AREA SHAPE=RECT COORDS="298,227,340,280" HREF="#" ALT="Régina Gabrielle">
<AREA SHAPE=POLY COORDS="317,204,323,280" HREF="#" ALT="André">
<AREA SHAPE=RECT COORDS="353,163,396,215" HREF="#" ALT="Marius">
<AREA SHAPE=RECT COORDS="391,135,430,201" HREF="#" ALT="Lucille">
<AREA SHAPE=RECT COORDS="431,218,476,297" HREF="#" ALT="Elise">
</MAP>
<a onmouseover="FSee('circle',30,100);" onmouseout="FHide('circle');">
Marcel Jules </a>



Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top