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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menu bar problems

Status
Not open for further replies.

cactus1000

Programmer
Aug 31, 2001
149
0
0
US
I have a menu bar that currently requires a mouse click to open the second-level pull-out menu. I have been asked to change it from opening after a "click" to opening on a mouseover.


I changed this:

<a href="javascript:pulloutStart(0)">whatever.jpeg</a>
<a href="javascript:pulloutStart(1)">whatever1.jpeg</a>

etc.


to this:

<IMG SRC="whatever.jpeg" OnMouseover="javascript:pulloutStart(0)">
<IMG SRC="whatever1.jpeg" OnMouseover="javascript:pulloutStart(1)">

etc.

This works great as long as I mouse over the images in order (1 through 8). However, If I drag the cursor from image 1 to, say, image 5 (dragging the cursor over images 2, 3 and 4), the pull-out menu for image 2 will not close.

I know I need to change something in one of the pullout functions below, but I don't know what.

Does anyone know a solution to this? Do I need a onMouseout event?

Here is the code for the pull-out menus:



<script language="JavaScript" src="dynlayer.js"></script>


<script language="JavaScript">


function init() {
pulloutWindow = new Array

for (var i=0;i<=8;i++) {
pulloutWindow = new DynLayer('pullout'+i+'Window')
pulloutWindow.slideInit()
}

pulloutActive = false
pulloutShown = 0
}

function pulloutStart(i) {
if (i!=pulloutShown) {
pulloutActive = true
pulloutWindow[pulloutShown].slideTo(-285,null,15,15,'pulloutEnd('+i+')')
}
}

function pulloutEnd(i) {
pulloutShown = i
pulloutWindow.slideTo(0,null,15,15,'pulloutActive==false')
}

function conditionalResize() {
if (navigator.appName == "Netscape")
history.go(0)
}
//-->
</script>


 
could you post the whole code or link to the page?

- g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top