showing a popup via the OnMouseDown event

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

showing a popup via the OnMouseDown event

Post by hkbloke »

I have a <div> with an image in it which i use to display a pop-up menu (actually the content of the div is populated via an ajax call). When I click on the image the popup menu does not show. If i put the same image outside the div and click it the menu displays perfectly.

The declaration of the menu is in the main page body itself (i.e. not inside the div).

Is there something special i have to do to laucnh a popup menu from a link inside a div.

Edit - been reading the FAQs on the milonic site and have seen that the menu cannot be placed inside a div. Just to confirm that in my situation the menu is outside the div but the popup() call is inside.
Last edited by hkbloke on Wed Mar 05, 2008 8:33 pm, edited 1 time in total.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: launching a popup from within a div

Post by Ruth »

Hi,

The menu can be placed in a div, it just requires a specific method. Can you please give us a page so we can test?

Ruth
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

Re: launching a popup from within a div

Post by hkbloke »

The site is wip. Let me see if i can put a test harness together. Where should i send it ?
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

Re: launching a popup from within a div

Post by hkbloke »

I have done some further investigation and it has nothing to do with the div (sorry for the wrong steer) - the problem lies when i try to use the OnMoyseDown event to fire the popup(...) call.

Is there a workaround/solution for this ?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: showing a popuo via the OnMouseDown event

Post by Ruth »

Hi,

Well, you can paste the code here for a test page. The problem is that we need to have all relevant items, i.e. the full page code, the full css code, and the menu data code. You could zip this and send to me, it would be ruth [at] poems2u.com.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: showing a popuo via the OnMouseDown event

Post by Ruth »

Have you looked at the methods and functions page with note to the popup popdown functions of the menu?

http://milonic.com/menu_methods.php

They are the two bottom items on that page.

Ruth
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

Re: showing a popuo via the OnMouseDown event

Post by hkbloke »

Absolutely. I'm using the popup method.

<a href="javascript:popup('MyMenu')">show</a> ....... works

but <td OnMouseDown="popup('MyMenu')">show</td> .......does not.

I hagve seen other 3 yr old threads discussing this same prob - just wondering if there is a solution.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: showing a popuo via the OnMouseDown event

Post by Ruth »

Hi,

Unfortunately, I need the see the stuff and experiment, can't do it off the top of my head. So, if you want to post the full popup coding you have I'll see if I can create a menu and test it. Also, I found a post about popup which has the onMouseDown in it, it's swapping images but it has the full call code.

viewtopic.php?p=17850#p17850

Ruth
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

Re: showing a popuo via the OnMouseDown event

Post by hkbloke »

To be fair Ruth you don't need my code to experiement - just put together a simple menu and try and do a popup via the '<a href' and 'OnMouseDown' event. The first will work but the 2nd won't.

If not then even though i would prefer to stary with Milonicn i guess i have no option but to use a different DHTML menu product
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

Re: showing a popup via the OnMouseDown event

Post by hkbloke »

User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: showing a popup via the OnMouseDown event

Post by Ruth »

Well, I will see if I can find something to use. I'm not sure why you are using the onMouseDown, is this from a form button or something? Is there some reason not to use onclick? While I am searching for this, I'll post to Milonic and see if they have any idea. I am only a forum volunteer who likes this menu, I do not work for Milonic, I don't do functions, I am not real savvy on a lot of web stuff, I'm just pretty good an finding solutions when I have something exsiting to test.

Ruth
hkbloke
Beginner
Beginner
Posts: 7
Joined: Wed Mar 05, 2008 6:58 pm

Re: showing a popup via the OnMouseDown event

Post by hkbloke »

ruth - i was not aware of the volunteer nature of your forum involvment.

I have changed my code to use the OnClick instead of OnMouseDown and all works well. bizarre!

Many thanks for your help.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: showing a popup via the OnMouseDown event

Post by Ruth »

Hi,

You're very welcome. I have posted to Milonic to find out about the onMouseDown. I don't know what the difference is between that and onclick :) they seem to do the same thing, though I do remember seeing that onMouseDown for the swapImage which I think is Macromedia...

Ruth
Post Reply