PDA

View Full Version : Jim menu 5.7 again



davestewart66
12-05-2004, 11:17 AM
HI,
I have the menu layout as I want it and positioned correctly but in my frames page it is openiing in the header not the main frame. here is the script


function init()
{
//Main Menu items:
menus[0] = new menu(22, "horizontal", 250, 170, -2, -2, "#ffcc33", "#0000A0", "Verdana,Helvetica", 9,
"bold", "bold", "black", "white", 1, "gray", 2, "rollover:images/tri-down1.gif:images/tri-down2.gif", false, true, true, true, 12, true, 4, 4, "black");
menus[0].addItem("http://www.dynamicdrive.com", "mainframe", 100, "center", "Home", 0);
menus[0].addItem("#", "", 120, "center", "Web Building", 1);
menus[0].addItem("#", "", 100, "center", "News", 2);
menus[0].addItem("#", "", 110, "center", "Search", 4);

//Sub Menu for 2nd Main Menu Item ("web building"):
menus[1] = new menu(135, "vertical", 0, 0, -5, -5, "#ffcc33", "#0000A0", "Verdana,Helvetica", 9, "bold",
"bold", "black", "white", 1, "gray", 2, 62, false, true, false, true, 6, true, 4, 4, "black");
menus[1].addItem("http://www.dynamicdrive.com", "", 22, "left", "Dynamic Drive", 0);
menus[1].addItem("http://www.javascriptkit.com", "", 22, "left", "JavaScript Kit", 0);
menus[1].addItem("http://www.codingforums.com", "", 22, "left", "Coding Forums", 0);
menus[1].addItem("http://www.builder.com", "NEWWIN", 22, "left", "Builder.com", 0);

//Sub Menu for 3rd Main Menu Item ("News"):
menus[2] = new menu(130, "vertical", 0, 0, 0, 0, "#ffcc33", "#0000A0", "Verdana,Helvetica", 9, "bold",
"bold", "black", "white", 1, "gray", 2, "rollover:images/tri-right1.gif:images/tri-right2.gif", false, true, false, false, 0, true, 4, 4, "black");
menus[2].addItem("http://www.cnn.com", "", 22, "left", "CNN", 0);
menus[2].addItem("http://www.msnbc.com", "", 22, "left", "MSNBC", 0);
menus[2].addItem("http://news.bbc.co.uk", "", 22, "left", "BBC News", 0);
menus[2].addItem("http://www.cbsnews.com", "", 22, "left", "Sports News", 3);

//Sub Menu for Sub Menu "Sports News":
menus[3] = new menu(135, "vertical", 0, 0, 0, 0, "#E1E1E1", "black", "Verdana,Helvetica", 9, "bold", "bold", "black", "white", 1, "gray", 2, 62, false, true, false, false, 0, true, 4, 4, "black");
menus[3].addItem("http://www.espn.com", "", 22, "left", "ESPN Sports", 0);
menus[3].addItem("http://www.nba.com", "", 22, "left", "NBA", 0);

//Sub Menu for 4th Main Menu Item ("Search"):
menus[4] = new menu(130, "vertical", 0, 0, 0, 0, "#ffcc33", "#0000A0", "Verdana,Helvetica", 9, "bold", "bold", "black", "white", 1, "gray", 2, ">>", false, true, false, false, 0, true, 4, 4, "black");
menus[4].addItem("http://www.google.com", "", 22, "left", "Google", 0);
menus[4].addItem("http://www.yahoo.com", "", 22, "left", "Yahoo", 0);
menus[4].addItem("http://www.altavista.com", "", 22, "left", "AlltheWeb", 0);
menus[4].addItem("javascript:alert('hi')", "", 22, "left", "Teoma", 0);

} //OUTER CLOSING BRACKET. EVERYTHING ADDED MUST BE ABOVE THIS LINE.


I have only been modifying the first menu item so haven't changed the others yet. the structure of the frames page is

index1.htm (frames page)
header.htm (top frame)
main.htm (main frame)

In the header I have a large logo which opens into the main frame. here is the html

<div id="Layer2" style="position:absolute; width:507px; height:101px; z-index:2; left: 214px; top: 11px;">
<div align="center"><a href="main.htm" target="mainFrame"><img src="isislogo2.gif" width="507" height="114" border="0" /></a></div>
</div>

I have also tried the target name as "_mainframe" with no success.

Thanks

dave

ddadmin
12-06-2004, 11:18 PM
Frame targeting is supported in this menu- please read the documentation (tutorial.htm) included within the zip file for details. Specifically, you would modify:

menus[2].addItem("http://www.cnn.com", "", 22, "left", "CNN", 0);

to something like:

menus[2].addItem("http://www.cnn.com", "myframename", 22, "left", "CNN", 0);

where "myframename" is the name of the frame you wish to target.

davestewart66
12-07-2004, 07:51 AM
Hi,
Thanks for the reply. If you look at the code (line 6) in my original post you will see that I have already done this ("mainframe").

I didn't bother modifying the others as the first didn't work. If you look at the code you will see that I have changed the color, position and target for the menu and changed the target for the first item to "mainframe". I also tried "_mainframe" as well.


Any further ideas?

Thanks

dave