HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Hiding the pull downs below DIV
Post new topic   Reply to topic    HTML Help Forum Index -> DHTML
View previous topic :: View next topic  
Author Message
nagasree



Joined: 21 Sep 2004
Posts: 81
Location: Hyderabad, India

PostPosted: Thu Apr 21, 2005 5:26 am     Hiding the pull downs below DIV Reply with quote

Hi,

I have a small problem where I have menus that are created using DIV, when the menus are displayed and if the page contains any pull downs falling in the menu display area, the pulldown is displayed over the menu.

I want to hide the pull down when the div is displayed. for eg. similar to text box in the following html code.

Code:

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<BODY>
<FORM name="frmTest">
<div id="TestCombo" style="top:0px;left:0px;height:100px;width:800px;position:absolute;visibility:hidden;text-align:center; z-index:1000;background-color:#e5e5e5;">This is to <BR>Test the visiblity of combo</div>
<TABLE width="800px" cellpadding=0 cellspacing=0 border=0>
<TR>
<TD nowrap width="100px" height="100px" valign=top>
<SELECT NAME="cboSelect" class="selectmedium11" >
<option >This is to</option>
<option >This is to test </option>
</SELECT>
<TD nowrap width="700px" valign=top><input type=text name=txtText value="Test"></SELECT>
</TD>
</TR>
<TR>
   <TD nowrap  colspan=2 width="100%"><input type=button name="showDiv" value="Show Div" onclick="javascript:showHideDiv('visible')">&nbsp;&nbsp;<input type=button name="hideDiv" value="Hide Div" onclick="javascript:showHideDiv('hidden')"></TD>
</TR>
</TABLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
   function showHideDiv(prop)
   {
      document.getElementById("TestCombo").style.visibility = prop;      
   }
//-->
</SCRIPT>
</FORM>
</BODY>
</HTML>


-Nagasree
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Thu Apr 21, 2005 5:58 am     Reply with quote

It would see that you already have example code working which you can work from.
nagasree



Joined: 21 Sep 2004
Posts: 81
Location: Hyderabad, India

PostPosted: Fri Apr 22, 2005 3:57 am     Reply with quote

Did not get u
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Fri Apr 22, 2005 6:12 am     Reply with quote

The example you posted seems to do what you want
nagasree



Joined: 21 Sep 2004
Posts: 81
Location: Hyderabad, India

PostPosted: Wed Apr 27, 2005 9:52 pm     Reply with quote

Hmmm,

I am not sure it does if u run the html and on clicking the Show Div button the layer is displayed, but if you observe only the text box becomes hidden but not the Combo/pulldown.

I am using IE6
When I am displaying the layer, I need to hide the the pulldown also.

-Nagasree
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Thu Apr 28, 2005 6:54 am     Reply with quote

I always thought that the objects rendered by the OS, such as Select boxes overrode the CSS Visibility.

I'm not sure if this has changed since, but I don't think it has.
edgemonkey



Joined: 05 May 2006
Posts: 1
Location: Oklahoma

PostPosted: Fri May 05, 2006 4:16 am     Probably a Windows Bug Reply with quote

I have the exact same problem with select pulldowns always being displayed over a div of any z-index (on IE only). It really confounds me so bad my head wants to explode!

I'll bet its a windows issue, because a pulldown may need to be displayed outside of the current window or over another window, and they probably just never noticed the div issue.

Cheers!
-Josh
sizzler



Joined: 12 Apr 2007
Posts: 1

PostPosted: Thu Apr 12, 2007 3:19 am     Div over combo Reply with quote

this is a classical problem,
i have another better option for that,
check out : http://www.divcombo.blogspot.com/
I have also given an example
Keikura



Joined: 24 Mar 2007
Posts: 167
Location: U.K.

PostPosted: Thu Apr 12, 2007 11:40 am     Reply with quote

z-index'ing will solve the problem of drop down lists being displayed over CSS positioned elements.

The exception to this is IE6 which DOESN'T do z-index'ing whereas IE7 does.

The only way to get around it is either reposition the menu's or the drop down's.
Neither is really that good but there is third of using JS to hide the drop down's when you open up one of your menu's.

edit: And yes, AFAIK this is ONLY an IE6 problem, why they left z-index'ing out of IE6 in the first place is a great mystery...
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> DHTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial