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):
Okay... I found something out... I can use this code to get links to open in new windows from the menu: acemenu.AddItem('Terms Of Use', 'your_page.htm" target="_blank" onclick="window.open(this.href, this.target);return false', '', false , '', '0', '0'); But, when I try to control the size of the new window, by adding this... the entire dhtml menu disappears from the page! acemenu.AddItem('Terms Of Use', 'your_page.htm" target="_blank" onclick="window.open(this.href, this.target,'width=300,height=100,left=450,top=250,toolbar=yes');return false', '', false , '', '0', '0'); Does anyone know why it's doing that... and a way to possibly fix it? Thanks.
You have to escape the single quotes surrounding 'width=300,height=100,left=450,top=250,toolbar=yes' Try this acemenu.AddItem('Terms Of Use', '#" target="_blank" onclick="window.open(this.href, this.target,\'width=300,height=100,left=450,top=250,toolbar=yes\');return false', '', false , '', '0', '0'); Code (markup):