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!

Popup menu and Resolution changes

Status
Not open for further replies.

TheSaviour

Programmer
Sep 14, 2002
13
0
0
GB
I am having a lot of trouble with a Fireworks 4 created popup menu which is activated in an OnMouseOver event with the following code:
window.FW_showMenu(window.fw_menu_1,392,130);
Which as you can see includes the coordinates to popup, but the trouble is that as the screen resolution changes these coordinates become inaccurate. What I need is a javascript function that I can enter the right coordinates for each of the four menu functions (window.fw_menu_1, fw_menu_2 etc) so that in my OnMouseOver event I can just call this function with the appropriate menu number (the coordinates for that res would be in the function). I have attempted this so far with a series of if... loops but someone with more experience in javascript must know a better way. Any help appreciated.
Thanks

TheSaviour
 
So far I am using this:
function Resolutionloadmenu0() {
if(screen.width==1024)
{window.FW_showMenu(window.fw_menu_0,200,130);}
if(screen.width==800)
{window.FW_showMenu(window.fw_menu_0,2,130);}
}
but what I want to be able to do is have say a number parameter so I can load any menu from the same function because this only shows menu0. Can someone help me with this?
Thanks

TheSaviour
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top