Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How do I get a layer to cover a drop down list box?

I have a draggable layer which works fine but when I have drop down list boxes
on the page also, the list boxes seem to be permanently fixed in the foreground.
This means if I drag my layer over the list box, the list box is still on
top and it looks really strange.

Any ideas on how to fix this?

- AJP.
[333 byte] By [AJP10304] at [2007-11-9 16:11:51]
# 1 Re: How do I get a layer to cover a drop down list box?
Basically there isn't any way.

AJP10304 <ajp@pocko.freeserve.co.uk> wrote in message
news:3b7fd34a$1@news.dev-archive.com...

I have a draggable layer which works fine but when I have drop down list
boxes
on the page also, the list boxes seem to be permanently fixed in the
foreground.
This means if I drag my layer over the list box, the list box is still on
top and it looks really strange.

Any ideas on how to fix this?

- AJP.
Bronwyn Streeter at 2007-11-11 23:37:57 >
# 2 Re: How do I get a layer to cover a drop down list box?
Hi!
well there are four ways.
1) You can set the mouseover event to -> display = none on the list box ..
so when the mouse comes over the list box it disappears
or
2) define a div and describe its attributes as such in js so it is compatible
with what ur doing.
or
3) try giving it spanning. (might work!)
or
4) define two divs assigned to 1) your dragable object 2) to ur list box
so that when it comes over the box it over rides / ignores it.

Posted by Neo.
( http://storm.prohosting.com/~4g )
PS: i know there is a SOLUTION 4 THIS.. ( 100% sure about it ). you just
gotta search the web.
Neo at 2007-11-11 23:39:02 >
# 3 Re: How do I get a layer to cover a drop down list box?
All form elements will show through layers, not only select elements. Best
solution is to create DHTML dropdowns, set visibility to visible when clicking
on or rolling over the "menu box, setting visibility to hidden when rolling
off or clicking off the menu".

Kevin Cornwall
flyTrap media
http://members.home.net/flytrapmedia/

"AJP10304" <ajp@pocko.freeserve.co.uk> wrote:
>
>I have a draggable layer which works fine but when I have drop down list
boxes
>on the page also, the list boxes seem to be permanently fixed in the foreground.
> This means if I drag my layer over the list box, the list box is still
on
>top and it looks really strange.
>
>Any ideas on how to fix this?
>
>- AJP.
Kevin Cornwall at 2007-11-11 23:39:55 >
# 4 Re: How do I get a layer to cover a drop down list box?
There's a function called elementFromPoint that you can use to determine if
a drop down list is underneath your layer, if so hide the layer and then
re-show it when you move off of it again. This works for IE, not sure whether
the function is supported in Netscape.

"AJP10304" <ajp@pocko.freeserve.co.uk> wrote:
>
>I have a draggable layer which works fine but when I have drop down list
boxes
>on the page also, the list boxes seem to be permanently fixed in the foreground.
> This means if I drag my layer over the list box, the list box is still
on
>top and it looks really strange.
>
>Any ideas on how to fix this?
>
>- AJP.
Paul Cole at 2007-11-11 23:41:00 >
# 5 Re: How do I get a layer to cover a drop down list box?
I too had these problems. The best thing to do is to hide the list box when
you show the layer and vice versa. This works. This happens due to the
fact that the Select tag does not have a z-index property. you can see more
explanation in the microsoft site for this.
hope this helps you
Thanx

"AJP10304" <ajp@pocko.freeserve.co.uk> wrote:
>
>I have a draggable layer which works fine but when I have drop down list
boxes
>on the page also, the list boxes seem to be permanently fixed in the foreground.
> This means if I drag my layer over the list box, the list box is still
on
>top and it looks really strange.
>
>Any ideas on how to fix this?
>
>- AJP.
Gana at 2007-11-11 23:42:04 >