Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE bubbling problem - 1st post HELP!

Status
Not open for further replies.

caroldeck

Programmer
Joined
Jul 6, 2006
Messages
1
Location
US
i have a problem which i believe is related to IE bubbling. The full code is at:


The sublinks that appear when you mouseover "the work" works consistently on Firefox, but are less predictable on IE - they do not always appear (although they sometimes do.) The code for the sublinks is:

Code:
<div id="subLink" style="display:none; left:574px; top:390px; width:91px; position:absolute; float:left; text-align:center;">

    <a id="webLink" href="web.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('web','','images/webOn.gif',1)"><img src="images/webOff.gif" alt="web" width="31" height="13" border="0" id="web" style="margin-bottom:10px"/></a>

    <a id="photLink" href="photography.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('photography','','images/photographyOn.gif',1)"><img src="images/photographyOff.gif" alt="photography" width="91" height="17" border="0" id="photography" style="margin-bottom:10px" /></a>

    <a id="designLink" href="design.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('design','','images/designOn.gif',1)"><img src="images/designOff.gif" alt="design" width="46" height="17" border="0" id="design" style="margin-bottom:10px" /></a><br />

</div>

I add mouseover/mouseout functions to the <div> on the body load as follows:
Code:
document.getElementById("subLink").onmouseover=divBlock;
document.getElementById("subLink").onmouseout=divNone;

function divBlock() {
document.getElementById("subLink").style.display="block";}

function divNone() {
document.getElementById("subLink").style.display="none";}


Any ideas how I can get this to work in IE?
 
It looks like it might be a whitespace issue (i.e. there's a gap of a few pixels between the bottom sub-menu item and the "the work" item, which would cause the sub-menu to close.

So either remove the necessary whitespace, or put a timer on the menu so it doesn't close instantly... remembering, of course to cancel the timer when you need to.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top