Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Some small problems with simple "drop down"
- From: lists at dwsasia.com (Peter Lauri)
- Subject: [Javascript] Some small problems with simple "drop down"
- Date: Wed Aug 30 14:51:23 2006
Hi group, On http://asiaforestry.devdws.com you will find a menu that I have been trying to create. It works fine except that it sometimes "hacks" some when it should not. I use the property onMouseOver and onMouseOut to trigger these functions. When I hover the main menu section the corresponding submenu will be shown (if hovered for 0.7 seconds or more). And if you leave the main menu area for more then 7 seconds the original menu will be shown. Most of the "errors" come when I am in the region Calculator and FAQ section and in Firefox. Is this as good as it can get? Or can I improve it more? This is the JavaScript: function startdropdown(submenuid) { t=setTimeout("activatedropdown("+submenuid+")",500); } function stopdropdown() { clearTimeout(t); } function activatedropdown(submenuid) { hideSubMenus(); document.getElementById("subMenu"+submenuid).className = ""; document.getElementById("mainMenu"+submenuid).className = "selected"; } function hideSubMenus() { for(i=1; i<=7; i++) { document.getElementById("subMenu"+i).className = "subMenuHidden"; document.getElementById("mainMenu"+i).className = ""; } } function startNotActiveTimer(submenuid) { p=setTimeout("activatedropdown("+submenuid+")",7000); } /Peter www.lauri.se www.dwsasia.com
- Follow-Ups:
- [Javascript] Some small problems with simple "drop down"
- From: Peter Lauri
- [Javascript] Some small problems with simple "drop down"
- Prev by Date: [Javascript] IE radio buttons don't fire the onchange event
- Next by Date: [Javascript] IE radio buttons don't fire the onchange event
- Previous by thread: [Javascript] IE radio buttons don't fire the onchange event
- Next by thread: [Javascript] Some small problems with simple "drop down"
- Index(es):