Triad
New Member
Posts: 33
|
Post by Triad on Nov 27, 2008 12:05:08 GMT -5
This script will alert a message to a user whenever he or she clicks on a link that does not lead to your forum. This script could probably get annoying, but it was requested. Global Footers <script type="text/javascript"><!--
var alert_message = "Please be aware that you are now leaving YourSite which cannot control the content on the page that you are about to visit.";
for(var a = document.getElementsByTagName("a"), x = 0; x < a.length; x++){ if(a[x].href && !new RegExp("(\/index\.cgi|javascript:)", "").test(a[x].href)){ a[x].onclick = function(){ var _alert = confirm(alert_message); if(!_alert) return false; } } } //--></script>
|
|