Help Please!!! with menus

admin

Administrator
Staff member
I have been trying to get this code to work for almost two weeks, but I can't get it, and I need help. The below function is what creates my menus, but I want to make them scrollable. I have included in the comments where I think the code should go to make the menus scroll, but it doesn't work????? I would appreciate any advice, and I will try anything.

//CREATES MENUS
function _init(){
for(var i=0;i<document.all.length;i++){
if(document.all.getAttribute("menu")){
var attribs = _eat_attrib(document.all.getAttribute("menu"));
var tree = new Array();
var src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/document.all.item(attribs">http://www.webdeveloper.com/forum/archi ... em(attribs</a><!-- m -->["src"]).innerText;
src = _strip(src);
tree = _compile(tree,src);
var menuId = _menus.length;

document.all.menuId = menuId;
document.all.onmouseover = _rootmouseover;
document.all.onmouseout = _rootmouseout;

//THE BELOW IS WHERE MY MENU IS CREATED AND I THINK THIS IS WHERE I SHOULD MAKE THE SCROLLABLE OBJECT
//objContainer = new ConstructObject('attribs') (doesn't work)
var attribs = _eat_attrib(document.all.getAttribute("menu"));
attribs["border-width"] = (attribs["border-width"]!=null?attribs["border-width"]:1);
attribs["border-color"] = (attribs["border-color"]!=null?attribs["border-color"]:"black");
attribs["background"] = (attribs["background"]!=null?attribs["background"]:"#9C9A9C");
attribs["highlight"] = (attribs["highlight"]!=null?attribs["highlight"]:"#336699");
attribs["font-size"] = (attribs["font-size"]!=null?attribs["font-size"]:"10");
attribs["font-family"] = (attribs["font-family"]!=null?attribs["font-family"]:"verdana");
attribs["font-color"] = (attribs["font-color"]!=null?attribs["font-color"]:"White");
attribs["icon-color"] = (attribs["icon-color"]!=null?attribs["icon-color"]:"black");
attribs["arrow"] = (attribs["arrow"]!=null?attribs["arrow"]:true);
attribs["showrow"] = (attribs["showrow"]!=null?attribs["showrow"]:true);
attribs["height"] = (attribs["height"]!=null?attribs["height"]:22);
attribs["width"] = (attribs["width"]!=null?attribs["width"]:150);
attribs["arrow-offset"] = (attribs["arrow-offset"]!=null?Number(attribs["arrow-offset"]):135);
attribs["menu-offset"] = (attribs["menu-offset"]!=null?Number(attribs["menu-offset"]):1);
attribs["menu-topoffset"] = (attribs["menu-topoffset"]!=null?Number(attribs["menu-topoffset"]):0);
attribs["wait"] = (attribs["wait"]!=null?Number(attribs["wait"]):1000);
document.all.attribs = attribs;

//CREATE THE SCROLLER (doesn't work)
objScroller = new ConstructObject('attribs' , '_create(document.all,tree)')
//the create function creates all of the needed elements for this menu
}
}
}

//CREATES SCROLLABLE OBJECT
function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el = document.getElementById( obj );
this.css = this.el.style;

this.scrollHeight = this.el.offsetHeight
this.clipHeight = this.el.offsetHeight

this.up = MoveAreaUp;
this.down = MoveAreaDown;
this.MoveArea = MoveArea;
this.x;
this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this;
}:confused: :confused: :confused: :confused:
 
Back
Top