Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Open a "New Window" from Java Menu?

    Hi everyone, I was hoping you could help me with a faily easy question.
    I was asked to edit some script and I figured out most of it, however I can't seem to be able to make the links in my java script menu open in new pages.

    Any help would be appreciated. Below is a copy of the script.

    It's a very long script, so I just sent a section of it. Pleasse scroll down to the bottom to see where the links are (ex. http://www.korg.com, etc)

    Thank you, Paul.



    <!--
    function mmLoadMenus() {
    if (window.mm_menu_1107110519_0) return;
    window.mm_menu_1107110519_0 = new Menu("root",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);
    mm_menu_1107110519_0.addMenuItem("Parts&nbsp;Department","location='/e/support/accessories.html'");
    mm_menu_1107110519_0.addMenuItem("Warranty&nbsp;Registration","location='/e/support/warranty.html'");
    mm_menu_1107110519_0.addMenuItem("F.A.Qs","location='/e/support/faqs.html'");
    mm_menu_1107110519_0.addMenuItem("Tutorials&nbsp;&amp;&nbsp;Guides","location='/e/support/tutorials.html'");
    mm_menu_1107110519_0.addMenuItem("Related&nbsp;Products","location='/e/support/related_products.html'");
    mm_menu_1107110519_0.addMenuItem("Downloads","location='/e/support/downloads.html'");
    mm_menu_1107110519_0.addMenuItem("Newsletter","location='/e/support/newsletter.html'");
    mm_menu_1107110519_0.addMenuItem("Owner&rsquo;s&nbsp;Manual","location='/e/support/manual_request.html'");
    mm_menu_1107110519_0.addMenuItem("Korg Proview Request","location='/e/support/literature_request.html'");
    mm_menu_1107110519_0.addMenuItem("Suggested Retail Prices","location='/e/products/pricelists.html'");
    mm_menu_1107110519_0.hideOnMouseOut=true;
    mm_menu_1107110519_0.menuBorder=1;
    mm_menu_1107110519_0.menuLiteBgColor='#2a4960';
    mm_menu_1107110519_0.menuBorderBgColor='#000000';
    mm_menu_1107110519_0.bgColor='#000000';
    window.mm_menu_1107105559_0_1 = new Menu("KORG",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);
    mm_menu_1107105559_0_1.addMenuItem("KORG.com","location='http://www.korg.com'");
    mm_menu_1107105559_0_1.addMenuItem("Pricelist","location='http://www.korgcanada.com/e/products/pricelists.html'");

    mm_menu_1107105559_0_1.hideOnMouseOut=true;
    mm_menu_1107105559_0_1.menuBorder=1;
    mm_menu_1107105559_0_1.menuLiteBgColor='#2a4960';
    mm_menu_1107105559_0_1.menuBorderBgColor='#000000';
    mm_menu_1107105559_0_1.bgColor='#000000';
    window.mm_menu_1107105559_0_2 = new Menu("VOX",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);

    mm_menu_1107105559_0_2.addMenuItem("VOX.co.uk","location='http://www.voxamps.co.uk'");
    mm_menu_1107105559_0_2.addMenuItem("VOX online Newsletter","location='http://www.f3studios.com/vox'");
    mm_menu_1107105559_0_2.addMenuItem("Pricelist","location='http://www.korgcanada.com/e/products/pricelists.html'");

    mm_menu_1107105559_0_2.hideOnMouseOut=true;
    mm_menu_1107105559_0_2.menuBorder=1;
    mm_menu_1107105559_0_2.menuLiteBgColor='#2a4960';
    mm_menu_1107105559_0_2.menuBorderBgColor='#000000';
    mm_menu_1107105559_0_2.bgColor='#000000';
    window.mm_menu_1107105559_0_3 = new Menu("SAMSON",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);

    mm_menu_1107105559_0_3.addMenuItem("SAMSON WIRELESS","location='http://www.samsontech.com/products/brandpage.cfm?brandID=1'");
    mm_menu_1107105559_0_3.addMenuItem("SAMSON AUDIO","location='http://www.samsontech.com/products/brandpage.cfm?brandID=2'");
    mm_menu_1107105559_0_3.addMenuItem("Pricelist","location='http://www.korgcanada.com/e/products/pricelists.html'");

    mm_menu_1107105559_0_3.hideOnMouseOut=true;
    mm_menu_1107105559_0_3.menuBorder=1;
    mm_menu_1107105559_0_3.menuLiteBgColor='#2a4960';
    mm_menu_1107105559_0_3.menuBorderBgColor='#000000';
    mm_menu_1107105559_0_3.bgColor='#000000';
    window.mm_menu_1107105559_0_3a = new Menu("HARTKE",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);

    mm_menu_1107105559_0_3a.addMenuItem("HARTKE","location='http://www.samsontech.com/products/brandpage.cfm?brandID=3'");
    mm_menu_1107105559_0_3a.addMenuItem("Pricelist","location='http://www.korgcanada.com/e/products/pricelists.html'");

    mm_menu_1107105559_0_3a.hideOnMouseOut=true;
    mm_menu_1107105559_0_3a.menuBorder=1;
    mm_menu_1107105559_0_3a.menuLiteBgColor='#2a4960';
    mm_menu_1107105559_0_3a.menuBorderBgColor='#000000';
    mm_menu_1107105559_0_3a.bgColor='#000000';
    window.mm_menu_1107105559_0_4 = new Menu("LIGHTSNAKE",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);

    mm_menu_1107105559_0_4.addMenuItem("LIGHTSNAKE","location='http://www.soundtech.com'");
    mm_menu_1107105559_0_4.addMenuItem("Pricelist","location='http://www.korgcanada.com/e/products/pricelists.html'");

    mm_menu_1107105559_0_4.hideOnMouseOut=true;
    mm_menu_1107105559_0_4.menuBorder=1;
    mm_menu_1107105559_0_4.menuLiteBgColor='#2a4960';
    mm_menu_1107105559_0_4.menuBorderBgColor='#000000';
    mm_menu_1107105559_0_4.bgColor='#000000';


    window.mm_menu_1107105559_0 = new Menu("root",150,17,"Verdana, Arial, Helvetica, sans-serif",11,"#92c4f5","#2a495f","#2a495f","#99ccff","left","middle",3,0,500,0,0,true,true,true,0,false ,true);
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_1,"location='http://www.korg.com'");
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_2,"location='http://www.voxamps.co.uk'");
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_3,"location='http://www.samsontech.com'");
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_3a,"location='http://www.samsontech.com/products/brandpage.cfm?brandID=3'");
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_4,"location='http://www.soundtech.com'");

    mm_menu_1107105559_0.addMenuItem("Promotions","location='/e/promotions.html'");
    mm_menu_1107105559_0.addMenuItem("Suggested Retail Prices","location='/e/products/pricelists.html'");

    mm_menu_1107105559_0.hideOnMouseOut=true;
    mm_menu_1107105559_0.childMenuIcon="/images/nav/arrows.gif";
    mm_menu_1107105559_0.menuBorder=1;
    mm_menu_1107105559_0.menuLiteBgColor='#2a4960';
    mm_menu_1107105559_0.menuBorderBgColor='#000000';
    mm_menu_1107105559_0.bgColor='#000000';

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

    //-->

  • #2
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi,

    i register in this forum just to help you, as i seen the link you wants is after the location tag ..

    Code:
    location='/e/support/accessories.html'");



    good bye

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 250 Times in 246 Posts
    Try this:

    Code:
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_1,"window.open('http://www.korg.com', '_blank'");

  • #4
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Works with corrected syntax

    Glenngv's solutions works with corrected syntax. He left out a closing parenthesis. It should be
    mm_menu_1107105559_0.addMenuItem(mm_menu_1107105559_0_1,"window.open('http://www.tiger9.com', '_blank')");

    Glenn, thanks very much.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •