473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

need help with hide function

Hey, Im working on a javascript based menu system :
http://larsandre.mine.nu/menu2.htm

When the user first selected a menu-item the sub-menu appears nicly but if
the user then moves the cursors away from the menu area the sub-menu still
is shown. I need a function that hides the sub-menu. But Im not sure how do
to this. Would appreciate some input on this matter.


Jul 20 '05 #1
2 2345
"John Doe" <jo*****@email.com> wrote in message news:<3f********@news.broadpark.no>...
Hey, Im working on a javascript based menu system :
http://larsandre.mine.nu/menu2.htm

When the user first selected a menu-item the sub-menu appears nicly but if
the user then moves the cursors away from the menu area the sub-menu still
is shown. I need a function that hides the sub-menu. But Im not sure how do
to this. Would appreciate some input on this matter.

Try putting something like this in the onload event of the body tag:

setInterval('checkmenu()',4000)

in checkmenu check to see if any submenus are visible. If they are then hide them.

Hope this helps.
Jul 20 '05 #2
D Elkins wrote:
"John Doe" <jo*****@email.com> wrote [...]
When the user first selected a menu-item the sub-menu appears nicly but if
the user then moves the cursors away from the menu area the sub-menu still
is shown. I need a function that hides the sub-menu. But Im not sure how do
to this. Would appreciate some input on this matter.
Try putting something like this in the onload event of the body tag:


It's the `body' _element_.
setInterval('checkmenu()',4000)

in checkmenu check to see if any submenus are visible. If they are then hide them.


The better way is to put code into the `onmouseout' event handler of the
menu area that hides all submenus. Not only that the interval is too long
here (4 seconds?), it also steals the user computing time better to be used
for other purposes.
PointedEars

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
28
by: Randy Starkey | last post by:
Hi, Does anyone know where I can get a script that show a little plus sign after a line of text, that when you click the plus sign, more text is revealed on that same page, like a continuing...
3
by: Magnus Blomberg | last post by:
Hello! I have a client javascript that generates a string (like below). This string should then be used by server code (in this case a function called run). <script language=javascript>...
5
by: Ed Jay | last post by:
I have a switch statement that controls which of several containers is displayed or not. It currently looks like: function showHelp(n) { show('vhelp'); //makes parent container visible switch...
1
by: Brenton | last post by:
Hi I'm new to the group so if I make a major blunder posting this here I apologise in advance. I'm not a Programmer by any stretch of the imagination and I've been trying to sort out a small...
8
by: manmit.walia | last post by:
Hello Everyone, Long time ago, I posted a small problem I had about converting a VB6 program to C#. Well with the help with everyone I got it converted. But I overlooked something and don't...
10
by: CuTe_Engineer | last post by:
hii, i have cs assignment i tried to solve it but i still have many errors , plzz help mee :"< it`s not cheating becuz i`ve tried & wrote the prog. i just wanna you to show me my mistakes ...
4
by: Ty | last post by:
Hello all, I am creating a web site with Visual Stuido 2008. I am trying to use a java script file to create a busybox for login from this page http://blogs.crsw.com/mark/articles/642.aspx. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.