Click to See Complete Forum and Search --> : Menu Problem! Newb :(


Kmurray
12-27-2005, 03:04 PM
Hi folks im new here and new to javascript so please bare with me, I have a small problem with my drop down menus, i can't seem to find out how to link my pages up to my menu, say for instance in the drop down menu there's "Software" and i want to be able to click on software and it take me to the software page!, I aint got a clue how to do it so it would be great if one of yous could help me, I know this probably an easy task for yous guys :)

Thanks!

Here's the script incase you need it :)

//©Xara Ltd
if(typeof(loc)=="undefined"||loc==""){var loc="";if(document.body&&document.body.innerHTML){var tt=document.body.innerHTML;var ml=tt.match(/["']([^'"]*)index_hnavbar.js["']/i);if(ml && ml.length > 1) loc=ml[1];}}

var bd=2
document.write("<style type=\"text/css\">");
document.write("\n<!--\n");
document.write(".index_hnavbar_menu {z-index:999;border-color:#ffffff;border-style:solid;border-width:"+bd+"px 0px "+bd+"px 0px;background-color:#ffffff;position:absolute;left:0px;top:0px;visibility:hidden;}");
document.write(".index_hnavbar_plain, a.index_hnavbar_plain:link, a.index_hnavbar_plain:visited{text-align:left;background-color:#ffffff;color:#000000;text-decoration:none;border-color:#ffffff;border-style:solid;border-width:0px "+bd+"px 0px "+bd+"px;padding:4px 0px 4px 0px;cursor:hand;display:block;font-size:8pt;font-family:Arial, Helvetica, sans-serif;font-weight:bold;}");
document.write("a.index_hnavbar_plain:hover, a.index_hnavbar_plain:active{background-color:#8686f7;color:#ffffff;text-decoration:none;border-color:#ffffff;border-style:solid;border-width:0px "+bd+"px 0px "+bd+"px;padding:4px 0px 4px 0px;cursor:hand;display:block;font-size:8pt;font-family:Arial, Helvetica, sans-serif;font-weight:bold;}");
document.write("\n-->\n");
document.write("</style>");

var fc=0xffffff;
var bc=0x8686f7;
if(typeof(frames)=="undefined"){var frames=0;}

startMainMenu("",0,0,2,0,0)
mainMenuItem("index_hnavbar_b1",".gif",27,87,"javascript:;","","Home",2,2,"index_hnavbar_plain");
mainMenuItem("index_hnavbar_b2",".gif",27,87,"javascript:;","","Software",2,2,"index_hnavbar_plain");
mainMenuItem("index_hnavbar_b3",".gif",27,87,"javascript:;","","Support",2,2,"index_hnavbar_plain");
mainMenuItem("index_hnavbar_b4",".gif",27,87,"javascript:;","","Forum",2,2,"index_hnavbar_plain");
mainMenuItem("index_hnavbar_b5",".gif",27,87,"javascript:;","","Links",2,2,"index_hnavbar_plain");
mainMenuItem("index_hnavbar_b6",".gif",27,87,"javascript:;","","Contact us",2,2,"index_hnavbar_plain");
endMainMenu("",0,0);

startSubmenu("index_hnavbar_b3","index_hnavbar_menu",114);
submenuItem("Live Chat Support","javascript:;","","index_hnavbar_plain");
submenuItem("About us","javascript:;","","index_hnavbar_plain");
submenuItem("Information","javascript:;","","index_hnavbar_plain");
endSubmenu("index_hnavbar_b3");

startSubmenu("index_hnavbar_b2","index_hnavbar_menu",96);
submenuItem("Security Tools","javascript:;","","index_hnavbar_plain");
submenuItem("Registry Tools","javascript:;","","index_hnavbar_plain");
submenuItem("Misc","javascript:;","","index_hnavbar_plain");
endSubmenu("index_hnavbar_b2");

startSubmenu("index_hnavbar_b1","index_hnavbar_menu",90);
submenuItem("News","javascript:;","","index_hnavbar_plain");
submenuItem("Privacy Policy","javascript:;","","index_hnavbar_plain");
submenuItem("Feedback","javascript:;","","index_hnavbar_plain");
endSubmenu("index_hnavbar_b1");

loc="";

FromU2ME
12-27-2005, 03:57 PM
Is this the entire script? Seems like there are some functions missing...

Kmurray
12-27-2005, 04:14 PM
Is this the entire script? Seems like there are some functions missing...

Hi yeah this is the entire script for the index_hnavbar.js So this is just the navigation bar and menus script, I thought you would do all the linking up here!?

CrazyMerlin
12-27-2005, 04:40 PM
submenuItem("News","javascript:;","","index_hnavbar_plain");

that red set of quotes is most likely where you link your pages.

as a simple check, put an address of something like yahoo or google in there and give it a run

unless you have your menu items in an array, page location is usually declared in with the item data

Kmurray
12-27-2005, 05:00 PM
submenuItem("News","javascript:;","","index_hnavbar_plain");

that red set of quotes is most likely where you link your pages.

as a simple check, put an address of something like yahoo or google in there and give it a run

unless you have your menu items in an array, page location is usually declared in with the item data

Hi there thanks for the help, Well ive got a little closer however when i enter say news.html were you said it brings up a blank window but nothing appears so im thinking its how im putting the link in, Do i need to put anything in front of news.html or after it?

Thanks

Edit i got it: :)