I have an scrolling side dhtml 9 menu anchored in a cell. The starting coordinates are offset x and y. What I am trying to achieve is that when the page starts scrolling, the offset changes to a different x,y coordinate closer to the top so my menu doesn't end up over my footer at bottom of page.

Thanks for your help!

I have tried adding this to my first menu item as recommended by tutorials in dhtml 9:

var myitem=myitem.oParMenu.iY="Math.max(-65,stgct()+10)"

but it doesn't seem to work, probably because I am also using an anchored offset setting:

function stgtxy()
{
var x=8,y=-65;
for(var o=_STNS.fdmGetEleById("stTABLE");o;o=o.offsetParent)
{
x+=parseInt(o.offsetLeft);
y+=parseInt(o.offsetTop);
}
return [x,y];
}
_STNS._aStMenus[_STNS._aStMenus.length-1].iX="stgtxy()[0]";
_STNS._aStMenus[_STNS._aStMenus.length-1].iY="stgtxy()[1]+stgct()";

I say this because if I remove the anchor setting and set fixed coordinates then it works. But I worry about having the menu fixed as opposed to anchoring it within my container as it will probably end up over my content on smaller screens.

Here is the full menu without the first addition as explained in help tutorial:

<div id="stTABLE"><a href="http://www.dhtml-menu-builder.com" style="display:none;visibility:hidden;">Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com</a>
<script type="text/javascript">
<!--
stm_bm(["menu083e",900,"/menu/menu_images","blank.gif",1,"stgcl()","stgct()",0,0,250,0,1000,1,0,0,"","",0,1,1,2,"default","hand","file:///C|/Clients/No%20Way%20Jose/nowayjosemx2",1,25],this);
stm_bp("p0",[1,4,0,0,0,0,12,7,100,"",-2,"",-2,50,0,0,"#999999","transparent","",1,0,0,"#000000"]);
stm_ai("p0i0",[0,"Home","","",-1,-1,0,"http://www.nowayjosemx.com/index.html","_self","","","","",0,0,0,"","",0,0,0,0,1,"#f0ebd5",1,"#FFD602",1,"","",3,3,0,0,"#E6EFF9","#000000","#831e17","#34a8c2","italic bold 10pt Georgia","italic bold 10pt Georgia",0,0,"","","","",0,0,0],0,15);
function stgtxy()
{
var x=8,y=-65;
for(var o=_STNS.fdmGetEleById("stTABLE");o;o=o.offsetParent)
{
x+=parseInt(o.offsetLeft);
y+=parseInt(o.offsetTop);
}
return [x,y];
}
_STNS._aStMenus[_STNS._aStMenus.length-1].iX="stgtxy()[0]";
_STNS._aStMenus[_STNS._aStMenus.length-1].iY="stgtxy()[1]+stgct()";
stm_aix("p0i1","p0i0",[0,"","","",-1,-1,0,""],0,7);
stm_aix("p0i2","p0i0",[0,"The No Way José!\r\nDifference","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,0,1,"#f0ebd5",1,"#FFD602",1,"","",3,3,0,0,"#E6EFF9","#000000","#831e17","#831e17"]);
stm_aix("p0i3","p0i0",[0," Our Promise","","",-1,-1,0,"http://www.nowayjosemx.com/promise.html","_self","","","","",0,0,0,"","",0,0,0,0,1,"#f0ebd5",1,"#FFD602",1,"","",3,3,0,0,"#E6EFF9","#000000","#831e17","#34a8c2","10.5pt Verdana","10.5pt Verdana"],0,15);
stm_aix("p0i4","p0i3",[0," Who We Are","","",-1,-1,0,"http://www.nowayjosemx.com/no_way_jose.html","_self","","","","",12,13],0,15);
stm_aix("p0i5","p0i3",[0," Contact Us","","",-1,-1,0,"http://www.nowayjosemx.com/reservations.html"]);
stm_aix("p0i6","p0i2",[0,""],0,7);
stm_aix("p0i7","p0i2",[0,"Menus"],0,15);
stm_aix("p0i8","p0i3",[0," Dinner","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html","_self","","","","",0,0,0,"","",7,7]);
stm_bp("p1",[0,2,0,0,0,0,0,0,100,"",-2,"",-2,50,0,0,"#999999","#fcdf81","",1,7,2,"#66CCFF"]);
stm_aix("p1i0","p0i3",[0," Appetizers","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#appetizers","_self","","","","",0,0,0,"","",0,0,0,0,1,"#339966"],88,15);
stm_aix("p1i1","p0i3",[0," Soups","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#soups","_self","","","","",0,0,0,"","",0,0,0,0,1,"#E6EFF9"],88,15);
stm_aix("p1i2","p1i1",[0," Salads","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#salads"],88,15);
stm_aix("p1i3","p1i1",[0," Seafood","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#seafood"],88,15);
stm_aix("p1i4","p1i1",[0," Chicken","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#chicken"],88,15);
stm_aix("p1i5","p1i1",[0," House Specialties","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#specialties"],88,15);
stm_aix("p1i6","p1i1",[0," Cuts of Beef","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#beef"],88,15);
stm_aix("p1i7","p0i3",[0," Desserts & Coffees ","","",-1,-1,0,"http://www.nowayjosemx.com/menu.html#desserts"],88,15);
stm_mc("p1",[1,"#000000",1,0,"",3]);
stm_ep();
stm_aix("p0i9","p0i3",[0," Bar","","",-1,-1,0,"http://www.nowayjosemx.com/bar_menu.html"],0,15);
stm_aix("p0i10","p0i0",[0,"","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,0,1,"#f0ebd5",1,"#FFD602",1,"","",3,3,0,0,"#E6EFF9","#000000","#831e17","#831e17","bold 11pt Verdana","bold 11pt Verdana"],0,7);
stm_aix("p0i11","p0i0",[0,"Fabulous...","","",-1,-1,0,"http://www.nowayjosemx.com/gallery.html"]);
stm_aix("p0i12","p0i3",[0," ...Events","","",-1,-1,0,"http://www.nowayjosemx.com/events.html"]);
stm_aix("p0i15","p0i0",[0,"","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,0,1,"#f0ebd5",1,"#FFD602",1,"","",3,3,0,0,"#E6EFF9","#000000","#831e17","#34a8c2","italic bold 11pt Georgia","italic bold 11pt Georgia"],0,7);
stm_aix("p0i16","p0i2",[0,"The No Way José!\r\nCommunity"],0,15);
stm_aix("p0i17","p0i3",[0," Photo Galleries","","",-1,-1,0,"http://www.nowayjosemx.com/gallery.html"]);
stm_ep();
stm_em();
//-->
</script>
</div>

This looks like javascript. This is a java forum.
You'll get better responses on a javascript forum.

This looks like javascript. This is a java forum.
You'll get better responses on a javascript forum.

Sorry, for posting here then, my mistake, thanks for pointing me in the right direction.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.