Loading ...
Sorry, an error occurred while loading the content.

Re: Target=_blank

Expand Messages
  • Foteos Macrides
    ... From: denis_bruchet@yahoo.fr To: fote@macridesweb.com Sent: Saturday, February 05, 2005 8:17 AM Subject: Target=_blank Hi How can I add a (Target=_blank)
    Message 1 of 1 , Feb 5, 2005
    • 0 Attachment
      ----- Original Message -----
      Sent: Saturday, February 05, 2005 8:17 AM
      Subject: Target=_blank
       
      Hi
      How can I add a (Target=_blank) to an overlib script like below for opening each link in a new page...
      Thanks a lot.
      <a
       href="javascript:void(0);"
       onmouseover="return overlib('<a href=\'http://www.apple.com/fr/\'>Apple</a>'
        +'&lt;BR><a href=\'http://www.vnunet.fr/mac/home.htm\'>SVM Mac</a>'
        +'&lt;BR><a href=\'http://www.macplus.org/magplus/sommaire.php\'>Mac Plus</a>',
        STICKY,NOCLOSE,CAPTION,'TOUT POUR LE MAC');"
       onmouseout="return nd();">a caption</a>

      Regards
      Denis
       
      Denis,
       
      Simply include any additional attributes as you did the href.  Note that if your lead argument is HTML, you should use entities for all of the reserved characters such as angle-brackets:
       
      <a
       href="javascript:void(0);"
       onmouseover="return overlib('&lt;a target=\'_blank\'  '
        +'title=\'Apple site in a new window\'  '
        +'href=\'http://www.apple.com/fr/\'&gt;Apple&lt;/a&gt;'
        +'&lt;br&gt;&lt;a target=\'_blank\'  '
        +'title=\'SUM Mac site in a new window\'  '
        +'href=\'http://www.vnunet.fr/mac/home.htm\'&gt;SVM Mac&lt;/a&gt;'
        +'&lt;br&gt;&lt;a target=\'_blank\' '
        +'title=\'Mac Plus site in a new window\'  '
        +'href=\'http://www.macplus.org/magplus/sommaire.php\'&gt;Mac Plus&lt;/a&gt;',
        STICKY,NOCLOSE,CAPTION,'TOUT POUR LE MAC');"
       onmouseout="return nd();">a caption</a>
       
      Also, when your lead argument is HTML, it is better to define it as a string variable or array entry, so that you avoid having to entify the reserved characters, and have less of a concern about embedded quotes, e.g.:
       
      . .
      <head>
      . .
      <script type="text/javascript">
      <!--
      var tplmac = '<a target="_blank" '
       +'title="Apple site in a new window"  '
       +'href="http://www.apple.com/fr/">Apple</a>'
       +'<br><a target="_blank" '
       +'title="SUM Mac site in a new window"  '
       +'href="http://www.vnunet.fr/mac/home.htm">SVM Mac</a>'
       +'<br><a target="_blank" '
       +'title="Mac Plus site in a new window"  '
       +'href="http://www.macplus.org/magplus/sommaire.php">Mac Plus</a>';
      //-->
      </script>
      . .
      </head>
      <body>
      . .
      <a
        href="javascript:void(0);"
        onmouseover="return overlib(tplmac,
          STICKY,NOCLOSE,CAPTION,'TOUT POUR LE MAC');"
        onmouseout="return nd();">a caption</a>
      . . .
       
      Fote
      --
       
    Your message has been successfully submitted and would be delivered to recipients shortly.