SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Mar 14, 2007, 10:26 #1
- Join Date
- May 2005
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How to make a popup window from this dhtml menu?
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>
Code: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');
-
Mar 14, 2007, 16:13 #2
- Join Date
- May 2005
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
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.
Bookmarks