Maynard
07-30-2008, 09:22 PM
I realized this should have been scripting conflicts not script not running, sorry.
1) Drop-in content box
2) http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm
3) Describe problem:
The script runs great, when it is the only script in the head.
If I put this script:
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") == "blank")
anchor.target = "_blank";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "parent")
anchor.target = "_parent";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "self")
anchor.target = "_self";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "iframe")
anchor.target = "iframe";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "ss")
anchor.target = "showFrame";
}
}
window.onload = externalLinks;
before Drop-in content box neither script runs.
But if it is after Drop-in content box, Drop-in content box will not run, but the other script will.
How do I remedy this? I would like both scripts.
Maynard.
1) Drop-in content box
2) http://www.dynamicdrive.com/dynamicindex17/dropinbox.htm
3) Describe problem:
The script runs great, when it is the only script in the head.
If I put this script:
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") == "blank")
anchor.target = "_blank";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "parent")
anchor.target = "_parent";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "self")
anchor.target = "_self";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "iframe")
anchor.target = "iframe";
else if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "ss")
anchor.target = "showFrame";
}
}
window.onload = externalLinks;
before Drop-in content box neither script runs.
But if it is after Drop-in content box, Drop-in content box will not run, but the other script will.
How do I remedy this? I would like both scripts.
Maynard.