Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:35

How to "popup" at a specified coordinate position?


Poster: gmacfarlane
Dated: Tuesday December 31 2002 - 16:42:00 GMT

I am using the popup() function to display a menu, but I would like to be able to control the position of the menu - I am trying to get the popup menu positioned somewhere close to where the mouse is, the "x" coordinate being fixed at "0". Can anyone suggest how I should do this? Here is the sort of thing I have been trying:

Code: Select all

function main_popup(m,x,y)
{  mnu=getMenuByName(m);
    mnu[1]=y;
    mnu[2]=x;
    popup(m);
}


I have tried various attempts to use "setpos()" and "spos()" but this was based largely on guesswork.

popup() does indeed have an optional second parameter which pops the menu up "close" to the current mouse pointer, but this doesn't work for me as the cursor is in a different frame at the time that I want to call popup().

:?: Can anyone suggest how to "popup" at a given coordinate position?

:?: And/or is there a user manual somewhere, which documents the functions (API) ?

Many thanks, in advance.[quote][/quote]


Poster: kevin3442
Dated: Saturday January 4 2003 - 7:22:30 GMT

Hi Graeme,

You posted this a few days ago, so I thought I'd ask if you're still interested, before I post more code. I've been working a little on a library of various positioning functions to go with the menus. It's working pretty well now, and will probably do what you want.

Let me know...

Kevin

Yes please!


Poster: gmacfarlane
Dated: Saturday January 4 2003 - 11:20:18 GMT

Hi Kevin,

Yes please! I am still prototyping so for the time being I had put it to one side (mentally labelled "problem understood, solution pending"), and moved on to other issues.

A library of positioning functions would be most gratefully received.

- Graeme


Poster: kevin3442
Dated: Friday March 7 2003 - 3:38:54 GMT

Don't know if you're still interested, but if you are, have a look at this message.

Kevin