Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: RE: overlapping menus


Message #1 by "Debreceni, David" <david_debreceni@r...> on Wed, 26 Jun 2002 08:44:41 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C21D0F.3D8693E0
Content-Type: text/plain;
	charset="iso-8859-1"

I use a couple of different functions here to hide the select boxes.  Hope
this helps.

For IE4 or better we use:
function selectHideunHide(task) {
	
	for (y=0; y<document.all.length;y++) {
		if (document.all[y].tagName.toUpperCase() == "SELECT"){
		
			if (task == "hide")
document.all[y].style.visibility="hidden";
			else 
				document.all[y].style.visibility="visible";
				
		}
	}
	return;
}

Netscape 4 is a bit trickier I could not really find a way, so we
encapsulated the entire form in an IFrame, then use this to hide the form:

function selectHideunHide(task) {
	var o = null;
	if (document.layers['formlayer'] != null){
	if(task == "hide") 	document.layers['formlayer'].visibility 
"hide";
	else document.layers['formlayer'].visibility = "show";
	}
}

For Netscape 6 it is very similar to IE, actually I never tested it but this
should work for IE4 or better I believe, I forget when getElementByID was
introduced into the DOM:

function selectHideunHide(task) {
	
	for (y=0; y<document.getElementById.length;y++) {
		if (document.getElementById(y).tagName.toUpperCase() ==
"SELECT"){
		
			if (task == "hide")
document.getElementById(y).style.visibility="hidden";
			else 
	
document.getElementById(y).style.visibility="visible";
				
		}
	}
	return;
}

-----Original Message-----
From: Jeff Chen [mailto:curtailment2@p...]
Sent: Tuesday, June 25, 2002 6:15 PM
To: ASP Web HowTo
Subject: [asp_web_howto] overlapping menus


Hello.  I have a html drop down menu below my javascript menu.  When I 
click on the javascript menu, part of it is covered up by the html menu.  
How can I make it so that the javascript menu will be on top when I click 
it?

Thanks

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20

Message #2 by "Jennifer O'Leary (WS2)" <JenniferO@W...> on Wed, 26 Jun 2002 09:32:25 +0100
I have seen this problem before and the answer in that case was to use 
IE5.5 or later - we couldn't fix it in old IE
sorry...


Subject: overlapping menus
From: "Jeff Chen" <curtailment2@p...>
Date: Tue, 25 Jun 2002 22:15:08
X-Message-Number: 19

Hello.  I have a html drop down menu below my javascript menu.  When I
click on the javascript menu, part of it is covered up by the html menu. 

How can I make it so that the javascript menu will be on top when I 
click
it?

Thanks
Message #3 by Paul R Stearns <pauls@c...> on Tue, 25 Jun 2002 17:27:24 -0400
Jeff:

I understand that it can be done, but you need to make the dropdown listbox
disappear using dhtml. It is my understanding that the listbox object has a "I
gotta be on top no matter what" attribute which is not changeable from javascript.

Paul

Jeff Chen wrote:

> Hello.  I have a html drop down menu below my javascript menu.  When I
> click on the javascript menu, part of it is covered up by the html menu.
> How can I make it so that the javascript menu will be on top when I click
> it?
>
> Thanks
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20

Message #4 by "Jeff Chen" <curtailment2@p...> on Tue, 25 Jun 2002 22:15:08
Hello.  I have a html drop down menu below my javascript menu.  When I 
click on the javascript menu, part of it is covered up by the html menu.  
How can I make it so that the javascript menu will be on top when I click 
it?

Thanks

  Return to Index