hey how do i popup a window when a user clicks a link? like how can i make a link open up in a new popup window. kinda like a popup ad where i can set the variables like size and stuff but it opens when they click a link? thanks so much...
Announcement
Collapse
No announcement yet.
popup via link
Collapse
X
-
Code:function pop(url, target){ var w = window.open(url, target, 'width=800,height=400,resizable=1'); w.focus(); return false; }
<a href="page.htm" target="popup1" onclick="return pop(this.href, this.target)">Popup 1</a>
<a href="page2.htm" target="popup2" onclick="return pop(this.href, this.target)">Popup 2</a>
For more details of the window features, go here.
Comment