![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Wenn du deine Besucher wirklich (technisch korrekt) ärgern willst, aber nicht zu doll, kombiniere http://www.scottandrew.com/weblog/articles/cbs-events> mit z.B. http://molily.de/javascript-popups>. Meine DOM- und JS-Kenntnisse sind ziemlich eingerostet, aber vielleicht kommt dann sowas dabei heraus (und funktioniert): function externalLinks() { if (!document.getElementsByTagName) return false; for (var anchor in document.getElementsByTagName('a')) with (anchor) if (getAttribute('href') && getAttribute('rel') == 'extern') addEvent('click', function() { return !window.open(this.href, this.target); }); } |
#2
| |||
| |||
|
|
function openwin() { window.open(this.getAttribute("href"), "neu", 'dependent=no,location=yes,menubar=yes,resizable=y es,scrollbars=yes,status=yes,toolbar=yes'); return false; } 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") == "extern") { anchor.onclick = openwin; } } } window.onload = externalLinks; |
![]() |
| Thread Tools | |
| Display Modes | |
| |