Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

x,y based map?

0 views
Skip to first unread message

Ian Campbell

unread,
Dec 7, 1998, 3:00:00 AM12/7/98
to
I've got a dhtml drag and drop script and I want to detect when the
dragged object moves over a rectangular area (just like an image map).
Is there some javascript code that will do this (that I can plug my
imagemap coords into)?

Otherwise, is there any way to sense whether a layer is touching another
layer? (Is it cross browser?)

thanks!
--
Ian Campbell - http://www.islandnet.com/~ianc -
secretdeadmediamachinecollage.etc...

Jim Ley

unread,
Dec 8, 1998, 3:00:00 AM12/8/98
to
On Mon, 07 Dec 1998 23:40:16 -0800, Ian Campbell <ia...@islandnet.com>
wrote:

>I've got a dhtml drag and drop script and I want to detect when the
>dragged object moves over a rectangular area (just like an image map).
>Is there some javascript code that will do this (that I can plug my
>imagemap coords into)?

I assume your script is a found one, not one you've written as it's a
relatively simple extension of the script to do this (that is it's
relative to the difficulty of designing the drag & drop script, so
it's not a trivial task.)

>Otherwise, is there any way to sense whether a layer is touching another
>layer? (Is it cross browser?)

Both problems are possible, they are simple checks to see if the the
layer.top, and layer.left are in appropriate positions, (adjusted for
offset from the top left of the screen and plus the height and stuff
of the layer and stuff.)

If no-one else comes up with a source code you can change, if you want
to e-mail me the Drag & Drop script you've got and what sort of thing
you want to do, I'll have a look and depending on the time I've got,
I'll get something working. (Posted to group if interested.)

>Ian Campbell - http://www.islandnet.com/~ianc -
>secretdeadmediamachinecollage.etc...

What's a secret dead media machine collage?
>

Jim

(Is this a better no-answer and the one which generated the geez Jim
thread?)

0 new messages