Hey guys,
Basically, I need a pop up on exit of my page, asking if they want to stay on the page for a discounted price or leave page. Then from the discounted page, if they exit that, again a pop up comes asking if they want to leave the page or stay where they are given a free gift.
I have a few problems with this. The java script I'm using works on the first page to the second page, however 1) it doesnt prompt the visitor asking them if they wish to stay or leave the page as it simply pops up a whole new window of the site. (Id perfer it to give a pop up prompt asking if they wish to leave the site or not and open the page in the same browser they were in). And 2) the script doesnt work from the discounted page to the free gift page since Im guessing its in a new window instead of an original browser? (because it works if you go directly to the discount page and leave however not from the pop up of the initial page). Finally 3) the script that partially works only works in Mozilla browser, not in google Chrome or even Internet Explorer. I've been trying to figure this out for weeks now and its driving me crazy, if anyone has any suggestions I'd greatly appreciate it. Thanks so much!
All details are below:
__________________________________________________ ______________________
The initial site is rippedocerous.com, which on exit should lead to rippedocerous.com/lastchanceoffer.html, which should then lead on exit to rippedocerous.com/freegift.html
The java script I used is below.
In the Header
<SCRIPT LANGUAGE = "JavaScript">
<!-- //
function openit(sURL){newwindow=open(sURL,"newwin","scrollb ars=yes", "toolbar=yes", "directories=yes", "menubar=yes", "resizabe=yes", "status=yes", "width=1000, height=1000");
}
//-->
</script>
</head>
In the Body
<body onUnload="javascript:openit ('lastchanceoffer.html')">
</body>
I went on fiverr.com and asked someone to write me a javascript to get it to work, they said they've done this before and can't get it to work with bluevoda. This is the script they sent me.
SCRIPT FOR OPENING POPUP
-------------------------
///////////////////////////////////////////////////////////////////////////
PLACE THIS SCRIPT ANYWHERE IN BETWEEN HEAD TAG
HEAD TAG LOOKS LIKE - <HEAD> PLACE CODE HERE </HEAD>
/////////////////////////////////////////////////////////////////////////////
<script type="text/javascript">
function exitpop()
{
my_window = window.open("URL OF PAGE HERE", "mywindow1", "status=1,width=350,height=150");
}
</script>
----------------------------------------------
TO RUN ABOVE SCRIPT
----------------------------------------------
//////////////////////////////////////////////////////////////////
PLACE THIS CODE IN THE STARTING OF BODY TAG
SOMETHING THAT LOOKS LIKE - <BODY onUnload="javascript:exitpop();"> </BODY>
//////////////////////////////////////////////////////////////////////////
<body onUnload="javascript:exitpop();"
-----------------------------------------------------------
THIS CODE IS FOR GETTING ALERT ON CLOSE
-----------------------------------------------------------
///////////////////////////////////////////////////////////////////////////
AGAIN PLACE THIS SCRIPT ANYWHERE IN BETWEEN HEAD TAG
HEAD TAG LOOKS LIKE - <HEAD> PLACE CODE HERE </HEAD>
/////////////////////////////////////////////////////////////////////////////
<script type="text/javascript">
function goodbye(e) { if(!e) e = window.event;
e.cancelBubble = true; e.returnValue = 'WE HAVE SOME SPECIAL OFFER FOR YOU !! ';
if (e.stopPropagation)
{
e.stopPropagation();
e.preventDefault();
}
}
window.onbeforeunload=goodbye;
</script>
Basically, I need a pop up on exit of my page, asking if they want to stay on the page for a discounted price or leave page. Then from the discounted page, if they exit that, again a pop up comes asking if they want to leave the page or stay where they are given a free gift.
I have a few problems with this. The java script I'm using works on the first page to the second page, however 1) it doesnt prompt the visitor asking them if they wish to stay or leave the page as it simply pops up a whole new window of the site. (Id perfer it to give a pop up prompt asking if they wish to leave the site or not and open the page in the same browser they were in). And 2) the script doesnt work from the discounted page to the free gift page since Im guessing its in a new window instead of an original browser? (because it works if you go directly to the discount page and leave however not from the pop up of the initial page). Finally 3) the script that partially works only works in Mozilla browser, not in google Chrome or even Internet Explorer. I've been trying to figure this out for weeks now and its driving me crazy, if anyone has any suggestions I'd greatly appreciate it. Thanks so much!
All details are below:
__________________________________________________ ______________________
The initial site is rippedocerous.com, which on exit should lead to rippedocerous.com/lastchanceoffer.html, which should then lead on exit to rippedocerous.com/freegift.html
The java script I used is below.
In the Header
<SCRIPT LANGUAGE = "JavaScript">
<!-- //
function openit(sURL){newwindow=open(sURL,"newwin","scrollb ars=yes", "toolbar=yes", "directories=yes", "menubar=yes", "resizabe=yes", "status=yes", "width=1000, height=1000");
}
//-->
</script>
</head>
In the Body
<body onUnload="javascript:openit ('lastchanceoffer.html')">
</body>
I went on fiverr.com and asked someone to write me a javascript to get it to work, they said they've done this before and can't get it to work with bluevoda. This is the script they sent me.
SCRIPT FOR OPENING POPUP
-------------------------
///////////////////////////////////////////////////////////////////////////
PLACE THIS SCRIPT ANYWHERE IN BETWEEN HEAD TAG
HEAD TAG LOOKS LIKE - <HEAD> PLACE CODE HERE </HEAD>
/////////////////////////////////////////////////////////////////////////////
<script type="text/javascript">
function exitpop()
{
my_window = window.open("URL OF PAGE HERE", "mywindow1", "status=1,width=350,height=150");
}
</script>
----------------------------------------------
TO RUN ABOVE SCRIPT
----------------------------------------------
//////////////////////////////////////////////////////////////////
PLACE THIS CODE IN THE STARTING OF BODY TAG
SOMETHING THAT LOOKS LIKE - <BODY onUnload="javascript:exitpop();"> </BODY>
//////////////////////////////////////////////////////////////////////////
<body onUnload="javascript:exitpop();"
-----------------------------------------------------------
THIS CODE IS FOR GETTING ALERT ON CLOSE
-----------------------------------------------------------
///////////////////////////////////////////////////////////////////////////
AGAIN PLACE THIS SCRIPT ANYWHERE IN BETWEEN HEAD TAG
HEAD TAG LOOKS LIKE - <HEAD> PLACE CODE HERE </HEAD>
/////////////////////////////////////////////////////////////////////////////
<script type="text/javascript">
function goodbye(e) { if(!e) e = window.event;
e.cancelBubble = true; e.returnValue = 'WE HAVE SOME SPECIAL OFFER FOR YOU !! ';
if (e.stopPropagation)
{
e.stopPropagation();
e.preventDefault();
}
}
window.onbeforeunload=goodbye;
</script>