RE: [WSG] XHTML external links

2004-10-05 Thread Jason Turnbull
> Richard Czeiger wrote: > Hi guys - having a little problem with the whole external links in > XHTML strict. > Code's below - doesn't seem to be working - can you help out? You were missing a couple of opening brackets, script below now works ok. Regards Jason function externalLinks(){ if

Re: [WSG] XHTML external links

2004-10-05 Thread Terrence Wood
untested...but it should work. > function externalLinks() > > if (!document.getElementsByTagName) return; > var anchors = document.getElementsByTagName("a"); > for (var i=0; i if (anchor[i].getAttribute("rel") == > "external") { anchor[i].target = "_blank"; } > } > } > window.onlo