Technical retard needs your help...

Status
Not open for further replies.

rgordon83

it's a wig
Dec 27, 2007
1,310
28
0
www.tribe9interactive.com
I'm the retard. And i need your help.

My AM gave me some code to use to make an exit pop-up to another offer. But it's not working. Here is the JS i put in between the head tags:

Code:
<script language="javascript">
window.onbeforeunload = fget
var mouseX,mouseY;
document.onmousemove=mtrack;
function mtrack(e) {
    if (!e) {e=event}
    if (e.clientX!=null){
        mouseX=e.clientX;
        mouseY=e.clientY;
    }
    }
 
function fget() {              
    if (typeof(event)=="object") {
       mouseX=event.clientX;
       mouseY=event.clientY;
    }
    if (mouseY<10 && mouseX>400) {
    alert("Don't Go");
    window.location="MyA filliate URL HERE";
    return "Click CANCEL to stay!";
    }              
    }
</script>
What am i doing wrong?

On a related note, he gave me another code to use to make a pop-under when the user click my button i can have a related offer.

The JS function is

function exitwindow(){

how would i tag the button to run that JS on click?


Thanks for helping this retard make more money!
 


I got it to work simple by adding a semicolon to the end of the first line:
Code:
window.onbeforeunload = fget
=
Code:
window.onbeforeunload = fget;
 
Status
Not open for further replies.