Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Somes problems with Layers and JavaScript

Reply
Thread Tools

Somes problems with Layers and JavaScript

 
 
HD
Guest
Posts: n/a
 
      02-20-2004
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.
--
@+
HD


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subnets between core and access/distribution layers & routing between layers J Cisco 0 12-13-2006 08:38 PM
Abstraction Layers And Their Importance Silverstrand Front Page News 0 01-31-2006 04:48 AM
question on javascript layers in aspnet tigozilla ASP General 1 12-23-2005 11:37 AM
Problems setting style attrabutes of multiple layers Eclectic Javascript 7 10-10-2004 07:29 PM
somes photo (les mimosas) Srgetv Digital Photography 2 01-29-2004 12:21 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57