How to force target="_blank" for HTML code created by JavaScript

Discussion in 'HTML & Website Design' started by StupidoLoco, Jun 22, 2009.

  1. #1
    Hi, help me please.:confused:
    HTML codes in a webpage:

    <script src="http://api.postrank.com/static/widget-v2.js" type="text/javascript"></script>

    Where the file "http://api.postrank.com/static/widget-v2.js" is beyond my control.

    The script from "postrank.com" write HTML codes into webpage, something likes tag "<a href>".
    They use document.write();

    My question is, how to force a target="_blank" attribute for the "<a href>" tag, in client-side.
    While that <a href> tag is created by external JavaScript.
    Thank you. :)
     
    StupidoLoco, Jun 22, 2009 IP
  2. firebolt

    firebolt Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    From http://diveintoaccessibility.org/day_16_not_opening_new_windows.html:
    Allow the visitor to choose whether or not he wants to open the link in a new window. Don't force it.
     
    firebolt, Jun 25, 2009 IP