You could load this JS function in your body onload event handler:

<script language="JavaScript">
<!--
function targetLinks()
{
    var where = "_self";
    for (var i=0; i<=(document.links.length-1); i++)
    {
        document.links[i].target = where;
    }
}
//-->
</script>

----- Original Message -----
From: "Dave Hannum" <[EMAIL PROTECTED]>


Hello,

I have a little "content management" application where the users can insert
hyperlinks via manually coding the href's into the article they are
entering.  However, to keep visitors from leaving the site when they click
on these links, I wish to force the TARGET="_blank" attribute into those
links, because the users refuse to.  I need to check for the existence of
this attribute in a link (that goes into the database) and force it in if it
does not exist.  Anybody done this before and care to share?  I figure it's
a job for RegEx but . . . .

Thanks,
Dave



______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to