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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:18

Troubles with _subOffsetTop and _subOffsetLeft


Poster: dagon
Dated: Thursday August 21 2003 - 14:35:18 BST

:( Problem: on menuv5rc5 the properties _subOffsetLeft and _subOffsetTop don't work, not even in the examples in your site!!! Browsing with Opera 7.11, MS Explorer 6 and Mozilla 1.4 on WinXP...


Poster: John
Dated: Thursday August 21 2003 - 15:10:40 BST

Dagon, more details of exactly what is going wrong are needed ("don't work" doesn't help us at all). Also, a URL is most helpful so we can see the problem and your code.

BTW, your Avatar is coming up as "X" (not found). You might want to try reloading it to the Forum.


Poster: dagon
Dated: Thursday August 21 2003 - 18:58:33 BST

Sorry, you are right! But actually I've not an url (I am testing offline) and I am poor in english. By the way, I'll try to explain me.
Here is my code:
Code:
_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_subOffsetTop=10              // Sub menu top offset
_subOffsetLeft=-10            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x


with(mainStyle=new mm_style()){

offcolor="#0099CC";
offbgcolor="black";

oncolor="#c5c5c5";
onbgcolor="#112833";

borderstyle="solid";
bordercolor="#262626";
separatorcolor = "#262626";
separatorsize = 1;
fontsize=12;
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Tahoma, Arial";
padding=5;
subimage="arrow.gif";
}




with(milonic=new menuname("mainmenu2")){_c=1
top = 0;
left = 0;
//itemwidth=60
//menuwidth="99%";
borderwidth = 1;
//screenposition = "center;middle";
//alignment="center";
style = mainStyle;
alwaysvisible = 1;
followscroll = "1,50,2"
//orientation="horizontal"
//filter = null;
//followscroll = null;
//keepalive = 1;
//overallwidth = null;
//righttoleft = null;
//itemheight=200;
//openonclick = null;
//bgimage="winxp_back.gif";
//position="relative"
//separatorcolor="green";
aI("text= Home;image=img/ico/home.gif;url=+BaseHref+fclick/fclick.php?ad=home;status=Indietro alla home page");
aI("text= Dagon??;image=img/ico/domanda.gif;showmenu=dagon");
aI("text= Narratori;image=img/ico/book.gif;showmenu=narratori");
aI("text= Opere;image=img/ico/pennelli.gif;showmenu=opere");
aI("text= Cerca;image=img/ico/cerca.gif;url=+BaseHref+fclick/fclick.php?ad=phpdig;target=dx");
aI("text= Forum;image=img/ico/cerca.gif;url=+BaseHref+fclick/fclick.php?ad=forum;target=dx");
aI("text= Links;image=img/ico/world.gif;showmenu=links");
aI("text= Ultime Notizie;image=img/ico/newspaper.gif;showmenu=news");
aI("text= E-m __at__ il;image=img/ico/email.gif;url=dagon __at__ netcat.it");
aI("text= Indietro;image=img/ico/indietro.gif;url=javascript:onClick=history.go(-1)");
}

with(milonic=new menuname("dagon")){
itemwidth=120;
borderwidth=1;
style=mainStyle;
aI("text=Perchè Dagon??;url=+BaseHref+fclick/fclick.php?ad=dag;target=dx")
aI("text=Mappa del sito;url=+BaseHref+fclick/fclick.php?ad=map;target=dx")
aI("text=Statistiche;showmenu=stats")
}

with(milonic=new menuname("stats")){
itemwidth=120;
borderwidth=1;
style=mainStyle;
aI("text=Visitatori;url=visiteurs/index.phptarget=dx")
aI("text=Clicks;url=+BaseHref+fclick/fclick.php?ad=fclick;target=dx")
}

with(milonic=new menuname("narratori")){
itemwidth=120;
borderwidth=1;
style=mainStyle;
aI("text=H.P. Lovecraft;showmenu=lovecraft")
aI("text=E.A. Poe;showmenu=poe")
}

with(milonic=new menuname("lovecraft")){
itemwidth=135;
borderwidth=1;
style=mainStyle;
aI("text=Biografia;url=+BaseHref+fclick/fclick.php?ad=hpl_bio;target=dx")
aI("text=Bibliografia;showmenu=hpl_biblio")
aI("text=Dicono di lui...;showmenu=hpl_dicono")
aI("text=Lovecraft in Italia;url=+BaseHref+fclick/fclick.php?ad=hpl_ed;target=dx")
aI("text=Links;url=+BaseHref+fclick/fclick.php?ad=hpl_lin;target=dx")
}

with(milonic=new menuname("hpl_dicono")){
itemwidth=150;
borderwidth=1;
style=mainStyle;
aI("text=Giuseppe Lippi;url=+BaseHref+fclick/fclick.php?ad=hpl_lippi;target=dx")
aI("text=Valerio Evangelisti;url=+BaseHref+fclick/fclick.php?ad=hpl_eva;target=dx")
aI("text=Robert Bloch;url=+BaseHref+fclick/fclick.php?ad=hpl_bloch;target=dx")
aI("text=Robert M. Price;url=+BaseHref+fclick/fclick.php?ad=hpl_price;target=dx")
aI("text=Stephen king;url=+BaseHref+fclick/fclick.php?ad=hpl_king;target=dx")
aI("text=Giuseppe Lippi II;url=+BaseHref+fclick/fclick.php?ad=hpl_lippi_mondo;target=dx")
}

with(milonic=new menuname("hpl_biblio")){
itemwidth=150;
borderwidth=1;
style=mainStyle;
aI("text=Narrativa;url=+BaseHref+fclick/fclick.php?ad=hpl_narr;target=dx")
aI("text=Poesia;url=+BaseHref+fclick/fclick.php?ad=hpl_poes;target=dx")
aI("text=Articoli & Saggi;url=+BaseHref+fclick/fclick.php?ad=hpl_sag;target=dx")
}

with(milonic=new menuname("poe")){
itemwidth=135;
borderwidth=1;
style=mainStyle;
aI("text=Dicono di lui...;showmenu=poe_dicono")
}

with(milonic=new menuname("poe_dicono")){
itemwidth=150;
borderwidth=1;
style=mainStyle;
aI("text=Charles Baudelaire;url=+BaseHref+fclick/fclick.php?ad=poe_baud;target=dx")
aI("text=Robert Bloch;url=+BaseHref+fclick/fclick.php?ad=hpl_bloch;target=dx")
}

with(milonic=new menuname("opere")){
itemwidth=120;
borderwidth=1;
style=mainStyle;
aI("text=Racconti;url=+BaseHref+fclick/fclick.php?ad=serv_racconti;target=dx")
aI("text=Libri;url=+BaseHref+fclick/fclick.php?ad=serv_libri;target=dx")
aI("text=Articoli & Saggi;url=+BaseHref+fclick/fclick.php?ad=serv_articoli;target=dx")
}

with(milonic=new menuname("links")){
itemwidth=140;
borderwidth=1;
style=mainStyle;
aI("text=Web-Link;url=http://web-link.it/")
aI("text=Fanucci;url=http://www.fanucci.it")
}

with(milonic=new menuname("news")){
itemwidth=120;
borderwidth=1;
style=mainStyle;
aI("text=ANSA;url=ansa.php;target=dx")
aI("text=REUTERS;url=reuters.php;target=dx")
}         

drawMenus();   


The menu appears to me with no offset of the submenus, neither left or top...


Poster: Hergio
Dated: Thursday August 21 2003 - 20:02:59 BST

Everything appears to be in order as far as I can see with a quick scan of your code. _SubOffset is how far from the upper right corner of a menuitem the child should render. So 0,0 would make it appear right off the upper corner of the item, if you add say 30 to the left, it should appear farther out to the right..try that and see. Also, try turning off followscroll to see if that affects it. Let us know what happens.


Poster: John
Dated: Thursday August 21 2003 - 20:15:10 BST

Don't worry about your English - you're doing just fine.

Quick tip - if you're not using a particular item in your code and have it commented out (//itemwidth=60), you can remove the entire line from your code. This makes it easier to read, and, in some cases, might even let it load a bit faster.


Poster: dagon
Dated: Thursday August 21 2003 - 21:04:20 BST

I don't know why, but with release candidate 5 i had the problems listed before, and with RC7 all woks fine... :?:


Poster: Hergio
Dated: Friday August 22 2003 - 3:10:27 BST

Usually thats because each new release generally fixes problems...we're not Microsoft here! Haha just razzin ya! :P Glad to hear its all set.