/    Sign up×
Community /Pin to ProfileBookmark

Add horizontal menu button

I found this free script on the internet and I wanted to add two horizontal buttons after the “loaction” button. Can somebody please help me with the code? Thanks in advance

function init(){
if(!window.standards) return;
if(window.inited) return;
////////////////////////////////// GLOBAL OFFSET VARIABLES //////////////////////////////
if(bw.wIE || bw.ns){
menuOffsetTop = 3; // first level menu. smaller number is more up
menuOffsetLeft = 2; // first level menu. smaller number is more right.
}
else if(bw.mIE){
menuOffsetTop = -1; // first level menu. smaller number is more right
menuOffsetLeft = -6; // first level menu. smaller number is more right
}
submenuOffsetTop = -14 ;// smaller number is closer to top

if(bw.wIE) submenuOffsetLeft = -12; // left-side menu. smaller number is closer to menu
else if(bw.mIE) submenuOffsetLeft = -4; // left-side menu. smaller number is closer to menu

submenuOffsetRight = 0;// right-side menu. smaller number is closer to menu.

////////////////////////////////// GLOBAL OFFSET VARIABLES //////////////////////////////

var uiMenubar = new Menubar();

//About Us
var stbMenu = new Menu(‘About Us’);
uiMenubar.add(stbMenu);
stbMenu.add(new MenuItem(‘Main index’,’http://simplythebest.net’));
stbMenu.add(new MenuItem(‘Affiliate programs’,’http://simplythebest.net/affiliates/’));
stbMenu.add(new MenuItem(‘CGI scripts’,’http://simplythebest.net/scripts/perl_scripts/’));
stbMenu.add(new MenuItem(‘Device drivers’,’http://simplythebest.net/drivers/drivers.html’));

//Investment
uiMenubar.add(plmMenu = new Menu(‘Investment’));
plmMenu.add(new MenuItem(‘Main business page’,’http://planmagic.com’));
plmMenu.addSeparator(“#000388”);
plmProdMenu = new Menu(‘Business software’);
plmProdMenu.help=”Windows, Menus, Tabs, Scrollers”;//appears in statusbar
plmProdMenu.add(new MenuItem(‘Business plan’,’http://planmagic.com/business_planning.html’));
plmProdMenu.add(new MenuItem(‘Marketing plan’,’http://planmagic.com/marketing_planning.html’));
plmMenu.add(plmProdMenu);
plmMenu.addSeparator(“#000388”);
plmMenu.add(new MenuItem(‘Download page’,’http://planmagic.com/download.html’));
plmMenu.add(new MenuItem(‘Register’,’http://planmagic.com/register.html’));
plmMenu.add(new MenuItem(‘Contact us’,’http://planmagic.com/contact.html’));

//Team
webMenu = new Menu(‘Team’);
webMenu.add(new MenuItem(‘Main index’,’http://simplythebest.net/web_builder/’));
webMenu.add(new MenuItem(‘Design’,’http://simplythebest.net/web_builder/design.htm’));
uiMenubar.add(webMenu);

//Location
wqpMenu = new Menu(‘Location’);
wqpMenu.add(new MenuItem(‘Web marketing plan’,’http://webquestpro.com/web_marketing.html’));
wqpMenu.add(new MenuItem(‘Targeted design’,’http://webquestpro.com/mdesign.htm’));
uiMenubar.add(wqpMenu);

uiMenubar.useMouseOver();
document.body.appendChild(uiMenubar);

// setWidth method added april 2, 2002.
uiMenubar.setWidth(“auto”,0);

window.inited = true;

}

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonJun 27.2004 — Ditch the script and go for a more CSS based dropdown.

http://alistapart.com/articles/dropdowns/
×

Success!

Help @dgregor spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...