[thelist] JavaScript Events on lower-level z-indexed elements

Victor Augusto de Campos piva00 at gmail.com
Thu Jan 8 19:57:43 CST 2009


Sorry, I thought that after I sent the email.

Well, it'll be kinda worky to do that, but I will try to explain it
better with some examples.
Basically I have something like this:

<!-- this div contains the application, it fills up the entire page -->
<div style="width:500px; height:500px">
<!-- this div controls the movement of the div with id "map", all it
does is wrap the clicks/moves and contains some other basic layers, so
it must fill the space of the viewport -->
<div id="control" style="width:500px; height:500px; position:absolute;
top:0; left:0; z-index:1000;">
</div>
<!-- this div contains some images inside which makes the map, its
position is set with the events attached to the div "control" -->
<div id="map" style="position:absolute; top:0; left:0; z-index: 10;">
</div>
<!-- and then I have some intermediate divs which I use to fill some
SVG/VML on them and bring some graphics in front of the map but behind
the "control" div -->
<div id="info1" style="position:absolute; top:0; left:0; z-index: 20;">
</div>
<div id="info2" style="position:absolute; top:0; left:0; z-index: 21;">
</div>
<div id="info3" style="position:absolute; top:0; left:0; z-index: 22;">
</div>
</div>

That's pretty basic, but I think it will clarify somethings.
Well then, what I need is: when I hover over one of the "infoX" divs
to trigger the event "mouseover" for them, the most likely I thought
was to calculate their position within the viewport, then use a
handler for the "mousemove" of the viewport to check wether it's over
one of them, but that's pretty complex for this application, as these
divs will be moved when the "map" div moves, etc, so I'm trying to
find a way to have this "event transparency" on them.

Thanks for the attention :D

On Thu, Jan 8, 2009 at 10:20 PM, ben morrison <morrison.ben at gmail.com> wrote:
> On Thu, Jan 8, 2009 at 5:36 PM, Victor Augusto de Campos
> <piva00 at gmail.com> wrote:
>> Hey ppl,
>> I've been trying, for a while now, to find a way to get some kind of
>> event "transparency" on multiple layers of elements which doesn't
>> relate between them except that one is superposed over another, and
>> goddamnit but the only freaking document I found about it is something
>> in the Open Ajax Alliance which opens for voting to develop a
>> framework which handles it ...
>
> Maybe you could start with what you are trying to accomplish, a basic
> test page with the issues you have is always a great help for us.
>
> ben
> --
> Ben Morrison
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



-- 
Victor "pivA" Augusto de Campos



More information about the thelist mailing list