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: Wednesday July 18 2012 - 06:07:46
screen position not correct
Poster: mike.saunders __at__ ntlworld.co
Dated: Thursday January 31 2002 - 12:02:36 GMT
I have the menu working fine in ie but in mozilla or netscape the position of the menu has shifted quite a bit.
any ideas
cheers Mike
Re: screen position not correct
Poster: dmurphy52 __at__ lycos.com
Dated: Monday April 1 2002 - 23:41:30 BST
i was going to point you to a post in the old forum that had the answer, but i see yadin has deleted it.
I'll hunt about for the code i added to fix this problem.
It involves adding an if statement and extra variables to one of the menus functions.
I'll post up the code as soon as i find where i put it.
Neil
Re: screen position not correct
Poster: saladpuncher
Dated: Tuesday April 2 2002 - 1:13:43 BST
ok, this is for version 3.2.5 - NOT the 3.3 beta version (although it probably will still work)
in the mmenu.js file in the function dmenu(mnu){ ..about line 325-330ish
add the following code:
if(ns4){ ...
change the line mt="...." to
mt="<layer z-index=90 visibility=hidden bgcolor=#" bgc " id=" mnu " top=" (menu[1] XX) " width=" thw " left=" (menu[2] YY) ">"
where the XX and YY are the pixel numbers you want to shift by (8 and 3 are usually ok).
then in the next part:
else{ iedf=""; ......
change the line mt "...." to
if (!document.all||ns6||opera){
mt="<div id=" mnu " style=\"" iedf ";z-index:90;visibility:hidden;" brd "position:absolute;background-Color:#" hlp[4] ";width:" (menu[3] ns6w) "px;left:" (menu[2] YY) "px;top:" (menu[1] XX) "px;\">"}
else{
mt="<div id=" mnu " style=\"" iedf ";z-index:90;visibility:hidden;" brd "position:absolute;background-Color:#" hlp[4] ";width:" (menu[3] ns6w) "px;left:" menu[2] "px;top:" menu[1] "px;\">"}
again where XX and YY are the pixel amount you want to shift the menu by, 8 and 3 again for example)
Hope you understand and hope this helps.
Neil
Re: screen position not correct
Poster: postmaster __at__ laby.kentdirec
Dated: Tuesday April 2 2002 - 10:58:36 BST
Thanks Neil!!
Worked like a dream
Mike