Web Analytics Made Easy -
StatCounter popup via link - CodingForum

Announcement

Collapse
No announcement yet.

popup via link

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • popup via link

    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...

  • #2
    Code:
    function pop(url, target){
      var w = window.open(url, target, 'width=800,height=400,resizable=1');
      w.focus();
      return false;
    }
    HTML:
    <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.
    Glenn
    vBulletin Mods That Rock!

    Comment

    Working...
    X