Prevent visitors from leaving the domain
Posted: Mon Nov 24, 2008 11:43 pm
Hi,
I want to prevent visitors from leaving the website when they're on the page called 'count.php' only.
I mean if a visitor clicks on an external link on that page, nothing will happen. Only links with the domain as base url will be active.
tried with a javascript:
----------------------------------------------------------
function stopEvent(e) {
if(!e) var e = window.event;
//e.cancelBubble is supported by IE - this will kill the bubbling process.
e.cancelBubble = true;
e.returnValue = false;
//e.stopPropagation works only in Firefox.
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
return false;
}
-----------------------------
but that's not enough.
Any idea???
Thanks!
I want to prevent visitors from leaving the website when they're on the page called 'count.php' only.
I mean if a visitor clicks on an external link on that page, nothing will happen. Only links with the domain as base url will be active.
tried with a javascript:
----------------------------------------------------------
function stopEvent(e) {
if(!e) var e = window.event;
//e.cancelBubble is supported by IE - this will kill the bubbling process.
e.cancelBubble = true;
e.returnValue = false;
//e.stopPropagation works only in Firefox.
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
return false;
}
-----------------------------
but that's not enough.
Any idea???
Thanks!