I found the following script (albeit, 3 yrs old), on this site (http://www.sitepoint.com/article/sta...mpliant-world). The intent of the script is to use XHTML in a standards compliant way to open a new window using javascript. This is in lieu of the deprecated target attribute. My problem is the script seems to work only in Opera. Under IE and Gecko-based browsers, the script does not generate an error, it simply doesn't work.

**********************************

function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;

**********************************

I used the above as inspiration to clean-up inline event-handlers in a tooltip script I've been using for years. The script is listed below and includes a couple of 'troubleshooting' lines that indicate the script is running through. I then took a page with my original tooltip script so that I know it works in IE/Opera/Gecko. I modified the page using both of the above scripts. It has the same problem; works in Opera only while causing no errors in IE or Gecko-derivatives.

**********************************

function tips()
{
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
var j=0;
for (var i=0; i<anchors.length; i++)
{
var tips = anchors[i];
if (tips.className == "tip")
{
j++;
var tipwin = "tipWin" + String(j);
tips.onmouseout = "tipDown('"+tipwin+"')";
tips.onmouseover = "toolTips(event,'"+tipwin+"',10);return true";
document.getElementsByTagName("a")[j].onclick = "alert('Hello')"; //troubleshooter
}
}
document.getElementById('test').value=tipwin; //troubleshooter
}
window.onload = tips;

**********************************
Oddly enough, if one installs these scripts and use the Gecko DOM inspector to see what's happening, the eventhandlers will appear where they are suppose to, but apparently do not fire.

Any comments/help?

RKM