Forum Moderators: open

Message Too Old, No Replies

<select> and DHTML menu

         

derelict

4:28 pm on Aug 30, 2006 (gmt 0)

10+ Year Member



Hello,

I've ran into the IE bug that makes <select> elements stand out even when there's an element with an higher z-index over it. In my case it's an ASP .NET DropDownList (a <select>, anyway) that refuses to stay below a drop down menu made with DHTML (some <div> that show or hide via JavaScript). The menu works perfectly except for this problem.
I've read thought the Web (and these forums) for a solution and I've been trying to solve the problem using the IFrame hack, because I'd like the DropDownList to show, even partially. However, though I'm able to cover the DropDownList with the IFrame, the DDList will get completely hidden (and unusable) because the IFrame is above it (but the menu hovers above the IFrame). Is there a way to fix this? Here's the code:


<iframe id="iframeA" style="width:500px; height:22px; position:absolute; border:solid 0px black; z-index:10; display:none;" src="javascript:false;" scrolling="no" frameborder="0" ></iframe>

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"></asp:DropDownList>

<script type="text/javascript">
var iframeA = document.getElementById('iframeA');iframeA.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
iframeA.style.display='block';
iframeA.style.visibility='visible';
</script>

I also tried filter=alpha(opacity=0), with no luck :(
If I remove the filter applied above, I get the whole IFrame in white, again without seeing the DDList. If I leave it like it's above, I get an IFrame that has exactly the same width of the DDList (when the width changes, the IFrame seems to also change), but still can't see the DDList. :S

Thanks in advance :)

<edit reason - avoid side scroll>

[edited by: tedster at 6:40 am (utc) on Aug. 31, 2006]

dhtml

7:01 am on Aug 31, 2006 (gmt 0)

10+ Year Member



Hello,

I'm completely confused by your words. Do you want to show the select DDList below the DHTML menu? What's the use of iframe?

You may take a look at this sample <link removed>

<Sorry, no example links
See Forum Charter [webmasterworld.com]>

[edited by: tedster at 6:57 pm (utc) on Aug. 31, 2006]

derelict

8:49 am on Aug 31, 2006 (gmt 0)

10+ Year Member



Hello,

I'm sorry for not being clear on my description; I need the DDList to show on the layer below the menu, hence my option to use the IFrame solution.
On the examples you posted, I need something like in example C, but I need to display the DDList where the IFrame is shown; is this possible?

Thanks :)