How to make links with target=blank xhtml-strict?
When you want to make your XOOPS xhtml-strict you have to watch out for a few things that differ from xhtml-transitional. One of these things is that target=blank is not allowed in xhtml-strict. I know that making XOOPS xhtml-strict is ahead of time, since XOOPS struggles to be xhtml-transitional, but I wanted to let you know. Add this function between the head-tags of your theme:
<script type="text/javascript">
<!--
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";
}
}
//-->
</script>
<body onload="externalLinks();">
target="_blank"
rel="external"
This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=486