Troubles with _subOffsetTop and _subOffsetLeft

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
dagon
Advanced
Advanced
Posts: 29
Joined: Wed May 29, 2002 10:00 pm
Location: Udine, ITALY
Contact:

Troubles with _subOffsetTop and _subOffsetLeft

Post by dagon »

:( 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...
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
User avatar
dagon
Advanced
Advanced
Posts: 29
Joined: Wed May 29, 2002 10:00 pm
Location: Udine, ITALY
Contact:

Post by dagon »

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: Select all

_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@il;image=img/ico/email.gif;url=mailto:dagon@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...
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
User avatar
dagon
Advanced
Advanced
Posts: 29
Joined: Wed May 29, 2002 10:00 pm
Location: Udine, ITALY
Contact:

Post by dagon »

I don't know why, but with release candidate 5 i had the problems listed before, and with RC7 all woks fine... :?:
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply