WEB Quick Rookie Webmaster Question

Discussion in 'OT Technology' started by halflife78, Nov 12, 2007.

  1. halflife78

    halflife78 OT Supporter

    Joined:
    Aug 11, 2004
    Messages:
    13,864
    Likes Received:
    50
    Location:
    Atlanta Area
    How do I make a link on my page that I made pop up in a new window instead of replacing my page. In my top news column here www.stateofsanity.net the link to the newsletter is what I am trying to make do this but I don't know how.
     
  2. sparq

    sparq New Member

    Joined:
    Dec 3, 2004
    Messages:
    13,183
    Likes Received:
    0
    Location:
    Syracuse
    a href="yourlinkhere" target="_newWindow">Link</a>

    Use target... you can make the _newWindow be anything you want.
     
  3. halflife78

    halflife78 OT Supporter

    Joined:
    Aug 11, 2004
    Messages:
    13,864
    Likes Received:
    50
    Location:
    Atlanta Area
    Got it, thanks everyone. Now I have to figure out how to add paypal links into my pages to buy the art.:noes:
     
  4. trev.the.enemy

    trev.the.enemy New Member

    Joined:
    Jun 26, 2006
    Messages:
    10,939
    Likes Received:
    0
    Location:
    Midwest
    Paypal should generate the links for you.

    Or they did last time I did anything like that a couple years ago. :o
     
  5. Swerve

    Swerve OT Supporter

    Joined:
    Feb 20, 2005
    Messages:
    3,175
    Likes Received:
    3
    Use the tools PayPal offer, they wil save you a lot of time and also give customers confidence in your site/security.
     
  6. halflife78

    halflife78 OT Supporter

    Joined:
    Aug 11, 2004
    Messages:
    13,864
    Likes Received:
    50
    Location:
    Atlanta Area
    I found that on paypal and generated the links, I just have to figure out how to integrate it into my code on my site properly.
     
  7. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    And an XHTML solution if you need it.

    external.js
    Code:
    function externalLinks() {
     if (!document.getElementsByTagName) return;
     var anchors = document.getElementsByTagName("a");
     for (var i=0; i<anchors.length; i++) {
       var anchor = anchors[i];
       if (anchor.getAttribute("href") &&
           anchor.getAttribute("rel") == "external")
         anchor.target = "_blank";
     }
    }
    window.onload = externalLinks;
    
    Code:
    <script type="text/javascript" src="/external.js">
    </script>
    
    <a href="document.html" rel="external">external link</a>
    
     

Share This Page