| | |
Small menu popup on hover via CSS - IE prob
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2006
Posts: 164
Reputation:
Solved Threads: 3
Hey all,
I'm trying to make a small menu popup via CSS. On rollover, the link should display another set of links below the link that the mouse is hovering on. The code Below works in FF but not in IE. Could someone help out? Thanks.
I'm trying to make a small menu popup via CSS. On rollover, the link should display another set of links below the link that the mouse is hovering on. The code Below works in FF but not in IE. Could someone help out? Thanks.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
style.css .navigation { margin: 0.5em; padding: 0.3em; border: 1px solid #C4C4C4; text-align: left; } .navigation li a:link, a:visited{ color: #545454; text-decoration: none } .navigation li a:hover{ color: #72C32B; } .navigation li a:active { color: #545454; text-decoration: none } .navigation ul{ list-style-type: none; margin: 0.3em 0 0.1em 0.1em; padding: 0em 0 0.1em 1em; } .navigation li .popup { display:none; background-color:white; background-style:solid; position:float; } .navigation li:hover .popup, .navigation li:focus .popup, .navigation li:active .popup { display:block; }
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
nav.html <div class="navigation"> <ul> <li><a href="Home.html">Home</a></li> <li> <a href="#">Links</a> <div class="popup"> <ul> <li><a href="link1.html">Link 1</a></li> <li><a href="link2html">Link 2</a></li> <li><a href="link3.html">Link 3</a></li> </ul> </div> </li> </ul> </div>
hi
use javaScript as follows:
<a href="#" onmouseover="javascript:fun1();" onmouseout="javascript:fun2()">Links</a>
where inside fun1() put
document.getElementById("div_p").style.display="block";
and inside fun2() put
document.getElementById("div_p").style.display="none";
where div_p is id of "popup" tag
.....i hope it solves your problem.
if you find to do something like this in IE also plz put here...
have a nice time !!!
use javaScript as follows:
<a href="#" onmouseover="javascript:fun1();" onmouseout="javascript:fun2()">Links</a>
where inside fun1() put
document.getElementById("div_p").style.display="block";
and inside fun2() put
document.getElementById("div_p").style.display="none";
where div_p is id of "popup" tag
.....i hope it solves your problem.
if you find to do something like this in IE also plz put here...
have a nice time !!!
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Indian Developer
http://falaque.wordpress.com/
•
•
Join Date: Oct 2006
Posts: 164
Reputation:
Solved Threads: 3
•
•
•
•
hi
use javaScript as follows:
<a href="#" onmouseover="javascript:fun1();" onmouseout="javascript:fun2()">Links</a>
where inside fun1() put
document.getElementById("div_p").style.display="block";
and inside fun2() put
document.getElementById("div_p").style.display="none";
where div_p is id of "popup" tag
.....i hope it solves your problem.
if you find to do something like this in IE also plz put here...
have a nice time !!!
Hey,
Thanks for the help however I get an error when I attempt to run this code:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
javascript <script language="javascript"> function displayMenu() { document.getElementById("popup").style.display = "block"; } function hideMenu() { document.getElementById("popup").style.display = "none"; } </script> html <div class="navigation"> <h2>Menu</h2> <ul> <li> <a href="#" onMouseOver="javascript:displayMenu();" onMouseOut="javascript:hideMenu();">Links</a> <div class="popup"> <ul> <li><a href="Link1.html">Link1</a></li> <li><a href="Link2.html">Link2</a></li> <li><a href="Link3.html">Link3</a></li> </ul> </div> </ul> </div>
I get an "Object required" error within both of the function where document.getelementbyid... is.
Any suggestions?
Last edited by Barefootsanders; Apr 3rd, 2008 at 12:48 pm.
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: IE 6 problem with .innerHTML
- Next Thread: database connection possible????
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser bug calendar captchaformproblem cart close codes column cookies createrange() css cursor date debugger decimal dependent design dom download dropdown element embed enter error events firefox focus form frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 iframe images index java javascript javascripthelp2020 jawascriptruntimeerror jquery jsp libcurl listbox maps masterpage media menu microsoft mimic mp4 onmouseover paypal php player position post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search security select software sql text textarea toggle unicode variables w3c webservice website window windowofwords windowsxp





