Forum Moderators: open

Message Too Old, No Replies

Changing target of links

Setting up popup menus for nav menu need help with script.

         

jvasq

11:38 pm on Dec 28, 2004 (gmt 0)



// JavaScript Document
function mmLoadMenus() {
if (window.mm_menu_1109153154_0) return;
window.mm_menu_1109153154_0 = new Menu("root",125,17,"Verdana, Arial, Helvetica, sans-serif",11,"#004E82","#004E82","#FFFFFF","#C0C0C0","left","middle",3,0,200,-5,7,true,true,true,0,true,true);
mm_menu_1109153154_0.addMenuItem("What's New","location='news.htm'");
mm_menu_1109153154_0.hideOnMouseOut=true;
mm_menu_1109153154_0.bgColor='#CCCCCC';
mm_menu_1109153154_0.menuBorder=1;
mm_menu_1109153154_0.menuLiteBgColor='#C0C0C0';
mm_menu_1109153154_0.menuBorderBgColor='#C0C0C0';

mm_menu_1109153154_0.writeMenus();
} // mmLoadMenus()

Problem: Need for the target of "What's New" to go to a iframe called "Main". I'm using frames so I do not have to repeat the navigation on all the pages when there is a change.

Thanks for the help.

CaseyRyan

7:07 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



This is just a guess cause I've never used this code before. After finding the mm_menu.js on someone's site and looking through it, it looks like it takes the action parameter and just does an eval on it.

So if you're iFrame name was Main, you would change the following line of code in the function you posted:

mm_menu_1109153154_0.addMenuItem("What's New","location='news.htm'"); 

to this:

mm_menu_1109153154_0.addMenuItem("What's New","[b]Main.location='news.htm[/b]'");

-=casey=-