[WSG] XHTML external links

2004-10-05 Thread Richard Czeiger
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? a href=http://www.google.com.au/; rel=externalnew window/a script function externalLinks() if (!document.getElementsByTagName) return; var

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; ianchors.length; i++) if (anchor[i].getAttribute(rel) == external) { anchor[i].target = _blank; } } }

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 script type=text/javascript function