How do I create a pop up (or is it a pop under?)

Discussion in 'HTML & Website Design' started by topdog9926, Mar 4, 2007.

  1. #1
    I would like a pop up (under) to appear when someone clicks off from my site. How/where can I get a code to do this, especially as I am somewhat HTML challenged?

    Thank you.
     
    topdog9926, Mar 4, 2007 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    That's the target attribute that does that. The target attribute is deprecated as of html4, 1999, in favor of a javascript solution. It is not valid in any strict DTD.

    In its simplest form, do
    
    <a href="some.html"
       onclick="return ! window.open(this.href);">somewhere else</a>
    Code (markup):
    The advantage of this method is that any UA can handle the link based on its own capabilities, whether they do javascript or not.

    Think it through before using. Opening new windows is seldom of benefit to your visitor. If he wants to do it that way, he can do it himself. Further, the user might be confused by his back button no longer working&#8212;especially the amateur who runs the browser maximized.

    cheers,

    gary
     
    kk5st, Mar 4, 2007 IP