473,573 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with onmouseout and layers, please.

I have a DIV that becomes visible when a link above it is moused over.

The DIV has links in it like so:

<div class="popup" onmouseout="hid eLayer(this);">
<a class="popuplin k" href="page1.htm l">Link 1</a><br/>
<a class="popuplin k" href="page2.htm l">Link 2</a><br/>
<a class="popuplin k" href="page3.htm l">Link 3</a><br/>
<a class="popuplin k" href="page4.htm l">Link 4</a><br/>
</div>

When you mouse out of the div, it goes back into hidden. But as soon as I
touch any of the links, it hides, thinking I've left the DIV.

Now, I'm assuming this is a z-index layer issue, but I've tried every
combination of things I could think of to prevent the mouseout action when
mouseing over one of the links.

I tried setting div.popup's z-index higher than a.popuplink's, lower than
a.popuplinks, and the same as. (I did set each to a position as well.)

What am I missing?
--
Sugapablo
http://www.sugapablo.net

Dec 9 '05 #1
2 1937
Ivo
"Sugapablo" wrote
I have a DIV that becomes visible when a link above it is moused over.

The DIV has links in it like so:

<div class="popup" onmouseout="hid eLayer(this);">
<a class="popuplin k" href="page1.htm l">Link 1</a><br/>
<a class="popuplin k" href="page2.htm l">Link 2</a><br/>
</div>

When you mouse out of the div, it goes back into hidden. But as soon as I
touch any of the links, it hides, thinking I've left the DIV.

Now, I'm assuming this is a z-index layer issue,


z-indeces have nothing to do with it. When the mouse enters the <a> element,
the onmouseout event handler of the parent <div> element is called like it
should. You don't show us your code, but I presume that is how you have set
up things: an onmouseout event handler for that div. So check in the
handling function if the calling element is a child of your popping div, and
if it is, leave the div alone, only proceed when the current element in not
in the div. Be warned there may be other elements inside an <a>, an <i> for
example, so a simple look at at the element's parentNode will not do.
Instead loop through the parentNodes until you hit either the <div> (give it
an id for easy recognition) or the <body> in which case you can safely
proceed with with hiding.

hth
ivo
http://4umi.com/
Dec 9 '05 #2
On Fri, 09 Dec 2005 20:28:58 +0100, Ivo wrote:
So check in the handling function if the calling element is a child of
your popping div, and if it is, leave the div alone, only proceed when
the current element in not in the div.


How would I do that? is the child element "calling" anything for me to
tell the handling function?
--
Sugapablo
http://www.sugapablo.net

Dec 9 '05 #3

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

Similar topics

5
8891
by: yoelgold | last post by:
hi can someone please tell me what "document.MM_sr" is. I tried searching for a explanation on the web but cant find anything. What does MM_sr represent? and where can i get documentation on it. thank you
2
1819
by: BillyTheKid | last post by:
Hello, I am very new to java and I have pasted the following code onto my website: #########################################3 <SCRIPT language=JavaScript> <!-- function MM_swapImgRestore() { //v3.0
2
3869
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 http://home.pacific.net.sg/~jacksony ? (the drop down bar could not work at www.apchosting.net but can drop at home.pacific.net.sg. I suspect it is a server problem but was told it...
7
3586
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title> </head> <style type="text/css">
5
3681
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually for repeated html im using the external js, i mean the TOP, BOTTOM they are repeated in every page, so i include them as functions in the external...
2
2025
by: gunnuk | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>WELCOME TO HEMA CREATIVE HOUSE</title> <style type="text/css"> <!-- @import...
0
1719
by: sknonline | last post by:
Greetings. I am having troubles using absolute positioning in IE6. When I establish the width as 100%, it's not spanning the entire width of the browser. It works in Firefox, Safari, and IE7.... Just not IE6. Any suggestions? Website: stevenkneff.com code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ...
5
2680
by: loveshack | last post by:
Can anyone help me please (i am quite a novice, but having fun learning). Im not sure if this is an ASP problem, a javascript problem or a browser problem. Firstly, everything i have written works fine in IE7 and beta IE8. My pages do not work however in Safari or Firefox, and please dont beat me, but i use Frontpage to write my site, and i...
2
1614
by: registry | last post by:
<%@Language="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title>Registry Network Hospital Detail</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized
0
7668
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7986
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8179
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8036
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5556
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5258
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3699
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.