/    Sign up×
Community /Pin to ProfileBookmark

How to make a popup window from the 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’);
[/code]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@GitmanauthorMar 14.2007 — Anyone know how to do this or if it's possible?
Copy linkTweet thisAlerts:
@GitmanauthorMar 14.2007 — 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.
×

Success!

Help @Gitman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...