View Full Version : Popit Menu rollover on image link

11-03-2007, 12:12 PM
Pop-it Menu


Hello, I wonder if this is possible:

I would like my existing rollover image menu to still be functional on the more button:

<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('more','','images/more_o.png',1)"><img src="images/more.png" alt="More" name="more" width="90" height="24" border="0"></a>

So how would I go about putting the below (popit) code into the above (existing) code to make them work together?

<a href="#" onMouseover="showmenu(event,linkset[1], '180px')" onMouseout="delayhidemenu()">News sites</a>

I tried a few things but it didn't work out.

Thank you.

11-04-2007, 01:42 PM
I thought I would give it 24 hours before I bump this thread.

Does anyone have any spare time to work this one out.

I know it's in the rules that this question would probably be skiped but I know some people like a "challenge"


11-06-2007, 08:09 PM

11-10-2007, 12:04 PM

11-10-2007, 11:02 PM
I can't do much with out a better idea of what's going on in your code--I am not very familliar with DD's scripts. Did you try something simple like:

<a href="#" onMouseOut="JAVASCRIPT: MM_swapImgRestore(); delayhidemenu()" onMouseOver="JAVASCRIPT: MM_swapImage('more','','images/more_o.png',1); showmenu(event,linkset[1], '180px')"><img src="images/more.png" alt="More" name="more" width="90" height="24" border="0"></a>
Just a shot in the dark. Hopefully a better coder then me (one who know more about this script) will come along. . .

BTW: It can sometimes take a while for someone to respond to a thread, especially if it is a complex question. And, if someone sees a bunch of "replies," people might asume that question is being answered. Better to wait, I think.

11-11-2007, 07:49 AM
Jas is pretty close. In general you can invoke multiple functions within an event handler just by separating each function with a semi colon. So in this case, the result may look something like:

<a href="#" onMouseover="showmenu(event,linkset[1], '180px'); MM_swapImage('more','','images/more_o.png',1)" onMouseout="delayhidemenu(); MM_swapImgRestore()">News sites</a>

Notice the lack of "javascript:".

11-11-2007, 05:23 PM
Interesting. Why shouldn't you use javascript: ? They are JS functions, right?

11-12-2007, 05:57 AM
Well, you'd use the prefix "javascript:" only inside the href attribute to let the browser know that this is a JavaScript link. Since I'm not setting the href attribute here, I don't use it.

12-07-2007, 10:50 PM
Thanks for the help, I tried both of your suggestions but the image still didn't show up. When I tried ddadmin's, I had to add the img src (see below):

<a href="#" onMouseover="showmenu(event,linkset[1], '180px'); MM_swapImage('more','','images/more_o.png',1)" onMouseout="delayhidemenu(); MM_swapImgRestore()"><img src="images/more.png" width="90" height="24" border="0"></a>

The More image now shows but not the rollover, but thats ok I guess.

Thanks alot.