How to make a popup window from this menu?

Discussion in 'JavaScript' started by tong1991, Jan 17, 2009.

  1. #1
    Hey,

    Can someone please help me figure this out... how would I make one of these links on this dhtml menu create a controlled popup window like this:

    <a class="link5" href="" onclick="window.open('http://www.domain.com','popup',config='height=500,width=828,top=20,left=20,toolbar=no,menubar=no,scrollbars =yes,resizable=no,location=no,directories=no,status=no')">Privacy Policy</a>
    acemenu = new ACEMenu('5i1'); 
    acemenu.position = 'right'; 
    
    acemenu.AddItem('Terms Of Use', 'http://www.domain.com', '', false , '', '0', '0'); 
    acemenu.AddItem('Return Policy', 'http://www.domain.com', '', false , '', '0', '0'); 
    acemenu.AddItem('Shipping Policy', 'http://www.domain.com', '', false , '', '0', '0'); 
    acemenu.AddItem('Privacy Policy', 'http://www.domain.com', '', false , '', '0', '0');
    Code (markup):
     
    tong1991, Jan 17, 2009 IP
  2. gnp

    gnp Peon

    Messages:
    137
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    acemenu = new ACEMenu('5i1'); 
    acemenu.position = 'right'; 
    
    acemenu.AddItem('Terms Of Use', 'http://www.domain.com', '', false , '', '0', '0'); 
    acemenu.AddItem('Return Policy', 'http://www.domain.com', '', false , '', '0', '0'); 
    acemenu.AddItem('Shipping Policy', 'http://www.domain.com', '', false , '', '0', '0'); 
    acemenu.AddItem('Privacy Policy', 'javascript:window.open(\'http://www.domain.com','popup',config='height=500,width=828,top=20,left=20,toolbar=no,menubar=no,scrollbars =yes,resizable=no,location=no,directories=no,status=no\')', '', false , '', '0', '0');
    Code (markup):
    I believe this should do the trick..

    (i have no hands-on experience with this menu code, but most likely they use the url you define as the href attribute of the used link, so putting you javascript code in there will most likely trigger it..)

    take a look
     
    gnp, Jan 17, 2009 IP