[Sigia-l] new Yahoo! search

Beau Lebens beau at dentedreality.com.au
Mon Apr 7 19:05:26 EDT 2003


This isn't a standard BlogSpot feature, but it's a very common addition to
personal blogs. It's done using a small JavaScript which just goes through
and modifies the "target" attribute of all href tasgs in your page when you
check the checkbox. The function is just;

function targetLinks(boNew){
 if (boNew) where = "_blank";
 else where = "_self";
 for (var i=0; i <=(document.links.length-1); i++) {
  if (document.links[i].href.indexOf("javascript") == -1 ){
   document.links[i].target = where;
  }
}

and it's called from this;

<input type="checkbox" name="targetnew" onclick="targetLinks(this.checked)">

Of course the usual caveats about browsers versions, compatibility etc would
have to apply here :D

Cheers,

Beau


//  -----Original Message-----
//  From: sigia-l-admin at asis.org [mailto:sigia-l-admin at asis.org]On Behalf Of
//  Joy Ray
//  Sent: Tuesday, 8 April 2003 4:10 AM
//  To: sigia-l at asis.org
//  Subject: RE: [Sigia-l] new Yahoo! search
//
//
//  Another (more elegant?) variation on the new-browser-or-not
//  idea....I don't
//  know enough about Blogspot to know if this is a standard
//  feature or not.
//
//  http://atrios.blogspot.com
//
//  joy
//
//  ------------
//  When replying, please *trim your post* as much as possible.
//  *Plain text, please; NO Attachments
//
//  Searchable list archive:   http://www.info-arch.org/lists/sigia-l/
//  ________________________________________
//  Sigia-l mailing list -- post to: Sigia-l at asis.org
//  Changes to subscription: http://mail.asis.org/mailman/listinfo/sigia-l
//




More information about the Sigia-l mailing list