473,732 Members | 2,210 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 1943
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
8909
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
1833
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
3892
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 is not possible, therefore assuming it is a client script problem? the script works last time...
7
3614
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
3693
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 js and call them. Why it doesn't work?
2
2039
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 url("css/IDESIGN 1.css"); @import url("css/IDESIGN.2.css"); body {
0
1725
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" "http://www.w3.org/TR/html4/strict.dtd">
5
2687
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 use iframes as ive not discovered how to do this any differently! So the issue is this, i have a...
2
1627
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
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9307
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.