[Javascript] Some small problems with simple "drop down"
Peter Lauri
lists at dwsasia.com
Wed Aug 30 14:55:43 CDT 2006
I think I might have solved it. It seamed like I forgot to open a <tr> tag,
had </tr> instead, and that FireFox did not like that.
Sorry for this post, it was very dumb of me...
/Peter
-----Original Message-----
From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]
On Behalf Of Peter Lauri
Sent: Thursday, August 31, 2006 2:48 AM
To: '[JavaScript List]'
Subject: [Javascript] Some small problems with simple "drop down"
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
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list