hiding slectbox with javacript

R

Ross

On this page you will see the dropdown hides under the box.


http://nationalservicesscotland.com/news/nss_news.php


I use this javascript to fix the dropdown in ie

// JavaScript Document

startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("dmenu");
for (i=0; i < navRoot.childNodes.length; i++) {
node = navRoot.childNodes;
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}

window.onload=startList;
//-->

The selectbox code is this....
<select name="select">
<option>All our divisions</option>
<option>Central Legal Office</option>
</select>


The menu in css looks like this


<li class="topmenuli"><a href="#" class="publications"><span
style="display:none">Publications</span></a>



I need for the selectbox to be hidden when either the 'publications', 'our
divisions' or 'news' node is rolled over.


Any help much appreciated!!!
 
R

Randy Webb

Ross said the following on 5/15/2006 5:19 AM:
On this page you will see the dropdown hides under the box.

You mean the li lists? The term "dropdown" has typically referred to
Select Lists.

I need for the selectbox to be hidden when either the 'publications', 'our
divisions' or 'news' node is rolled over.

<div id="divToHide" style="visibility:visible">
<select name="select">
......
</select>
</div>

<li
onmouseover="document.getElementById('divToHide').style.visibility='hidden'"
onmouseout="document.getElementById('divToHide').style.visibility='visible'"
Repeat for the three LI's that you need it to work with.

See the thread from just today "Hiding DIV tags based on id or title?"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,159
Latest member
SweetCalmCBDGummies
Top