Hi guys, how do i do an exit pop on this particular site? http://www.inklineglobal.com/adsales/betanews/pcb_offer_468_osdetect.html
Erm, its not exactly an exit pop, if you see the link, it does not open a new window.
Basically, how to load a html within a html on exiting.
Many thanks in advance.
I hate that site..
http://www.siteadvisor.com/sites/inklineglobal.com/summary/
It shall stay for now, till you get your script.
eh i understand. putting that aside, i really need help. back to topic? thanks really.
The script is here.
http://www.ez2ba.com/html/site-toys/leave-and-die.html
Mods edit: Corrected link
thanks kenneth.
But its only halfway there.
I want it to be like upon exiting right, it will prompt me ok or cancel, say for example if i click cancel, i want it to initiate a function or command that will pop up asking me to stay yet again. like the link i gave you.
hmm i get it. putting 2 of the same scripts shud do the trick?
If you wish to achieve a similar popup-on-exit effect as shown in the URL you have given, you can try hiding a HTML element within the page and display it when the window is closed. Or, in technical terms, set the "display" property of a HTML element such as a div tag to "none" using CSS, and during the onBeforeUnload event, set the same property back to "block" via JS so that it is shown to the user. Please note that the onBeforeUnload event is only supported by IE and Fx.
http://www.nczonline.net/archive/2006/3/312
http://latecomerx.com/work/Project_161_onBeforeUnload/
latecomerx, thanks alot. it works.
in the event that i got a situation like say, how do i place a cookie upon a particular link such that whatever i clicked, the box will appear. But if i click the particular link, it will direct me into another page, instead of showing the box asking me to stay again.
Many thanks in advance.
as mentioned by latercomerx, bumpzzz. need help. thanks.
Posted by Takumi2eLimit:
----
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>P161</title>
<script type = "text/javascript">
var exitFlag = 0;
function annoyUser(){
if (exitFlag == 0) {
window.onbeforeunload = function (e) {
if (typeof(e) == 'undefined') e = window.event;
document.getElementById('someContainer').style.display = 'block';
e.returnValue = "Please don\'t go... =(";
}
}
}
function blockPopUp () {
exitFlag = 1;
alert ("You are moving to another page without having to see the annoying pop-up!");
}
</script>
</head>
<BODY onUnload="annoyUser()">
<div id="someContainer" style="display: none; width: 500px; height: 320px; border: 1px solid #999;">
<h1>Some box asking you to return here</h1>
<p>lala, lala~ lala, lala~</p>
</div>
</body>
</html>
*********************************************************
OnUnload i called the function, but why is it the function is not working? enlighten me please.
----
Because you're setting the onbeforeunload event handler with the annoyUser() function which is only called when the page is unloading. If you want to define a variable which decides whether the box is shown, use this instead:
http://latecomerx.com/work/Project_161_onBeforeUnload/index3.text
And stop creating new threads for the same topic.
Originally posted by Takumi2eLimit:latecomerx, thanks alot. it works.
in the event that i got a situation like say, how do i place a cookie upon a particular link such that whatever i clicked, the box will appear. But if i click the particular link, it will direct me into another page, instead of showing the box asking me to stay again.
Many thanks in advance.
http://latecomerx.com/work/Project_161_onBeforeUnload/index4.html
look, before clicking the 'X' which is exit, i got a product page, and
in the product page i got a ' Buy Button', so when i click the ' Buy
Button ' the exit pop wont appear, instead it will lead me to my
shopping cart. However, other than the ' Buy Button ', whatever i click
will lead to the exit pop asking me to stay.
Thats my objective. hope you guys can help me. Have been stress with this for the past week or so.
Thanks so much
You should have mentioned this right from the start - it would have saved both of us so much time.
http://latecomerx.com/work/Project_161_onBeforeUnload/index5.html
latercomerx, a sincere thank you and sorry for not clarifying earlier.
not well verse with words.
Anyway, here comes the last and final part.
How do i implement the script you gave me into the below site?
http://www.inklineglobal.com/adsales/foxnews/tvo_offer_234_fire.html?mcp=SG
Such that even when im in the web, when i scroll down and press exit, the pop up will appear in the middle and not all the way up.
If the user scroll all the way down and the pop up is above, he wont be able to see the offer right. you get what i mean?
As in no matter where i scroll, and when i wanna exit, the pop up will always be in the middle of the screen.
As for the Buy function, there are two buy buttons which are forms, its is to be implemented there.
-------------------------------------------------------------------------------
Really need help on this final step as i know nuts about all these, seriously.
Thank you so, so much.
Use CSS' display: fixed property for the box that is shown prior to exiting the window to ensure it always stays within the visitor's viewport. IE6 does not support that property value, but there are CSS workarounds for it which can be found via Google.
For the Buy Now buttons, they are actually forms using an image as the submit button. Simply set the exitFlag to true before the form is submitted by using the onsubmit event handler will prevent the prompt asking the user to stay from showing up.
http://latecomerx.com/work/Project_161_onBeforeUnload/index7.html
latecomerX, i tried to figure out on how to implement it on the link i inserted in the last post but to no avail.
Your last post features the link which was what i want to achieve, but i just couldn't come up with merging everything together as i am a complete idiot with regards to this.
Do you mind helping me in merging and coming up with it?
Many thanks in advance.
bumpzzzz the thread. urgent. thanks alot.
bump thread. need help urgently. thanks
So currently, what do you need help with?
<HTML><HEAD>
<style type="text/css">
<!--
body {
margin:0px; background-color: #dbdbdb
}
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.style2 {
color: #3366cc;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
.bottomborder {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #999999;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: #000000;
}
.arpt { font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
}
.h { font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
color: #333333;
}
.style6 {font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #3366CC; }
.style10 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #999999; }
.style12 {color: #3366cc; font-weight: bold; font-family: Arial, Helvetica, sans-serif; font-size: 14px; }
.style13 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #3366cc;}
.style17 {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
}
.style26 {
font-weight: bold;
color: #006600;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style34 {font-weight: bold; font-family: Arial, Helvetica, sans-serif; color: #3366cc;}
.style35 {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #003366;
font-size: 18px;
}
.style36 {font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
}
-->
</style>
<script language=javascript src=http://inklineglobal.com/mcp/mcp.js></script>
<script language=javascript src=http://inklineglobal.com/mcp/mcp_cons.js></script>
<script language="javascript" src="../../order/cons.js"></script>
<script language="javascript">
function InsertProductCode(form1, PRODUCT)
{
var sValue;
if (PRODUCT == "TVO")
{
// Calculate savings correctly
var savings = GetPrice('140_00');
if (IsGBP())
savings = '70';
sValue = "PCShowBuzz - Turn your PC into a Super TV----" +
"Live Entertainment 24/7[br]Unlimited Access to 1000+ channels.[br]Usual " + GetCurrencyDenomination() + GetPrice('169_95') + ". Save "+GetCurrencyDenomination() + savings +"[br]60 Day Money Back Guarantee.[br]Immediate Download Delivery after ordering.----" +
GetPrice('29_95') + "----" +
"2----" +
"1----" +
PSB_CODE + "----" +
"Foxnews----" +
"yes----" +
PSB_DOWNLOAD + "----" +
PSB_SUPPORTURL + "----" +
"234_fire_29----" +
"----" +
"::";
}
if (PRODUCT == "TVOPR")
{
// Calculate savings correctly
var savings = GetPrice('360_00');
if (IsGBP())
savings = '175';
sValue = "PCShowBuzz Unlimited----" +
"Get Unlimited TV and Radio on your PC for 1 LOW Price![br]Premium Content from 5000+ TV Channels and Radio Stations [br]Usual " + GetCurrencyDenomination() + GetPrice('399_95') + ". Save "+GetCurrencyDenomination() + savings +"[br]60 Day Money Back Guarantee.[br]Immediate Download Delivery after ordering.----" +
GetPrice('39_95') + "----" +
"2----" +
"1----" +
PSBPR_CODE + "----" +
"Foxnews----" +
"yes----" +
PSBPR_DOWNLOAD + "----" +
PSBPR_SUPPORTURL + "----" +
"234_fire_39----" +
"----" +
"::";
}
form1.order.value = sValue;
// Sets MCP country code and currency value
SetCountryCode(form1);
SetCurrencyType(form1);
SetCurrencyDenomination(form1);
// Lets try setting the MCP Cookie
SetMCPCookie(GetCountryCode(), GetCurrencyType(), GetCurrencyDenomination());
// Sees if values have been set
//alert(GetMCPCookieStringAll());
//alert(form1.CountryCode.value);
//alert(form1.CurrencyType.value);
//alert(form1.CurrencyDenomination.value);
// MCP Testing
//var queryString = MCPGetQueryString();
//alert(queryString);
//var countryCode = GetCountryCode();
//alert (countryCode);
//var currencyType = GetCurrencyType();
//alert(currencyType);
return true;
}
</script>
</HEAD>
<BODY>
<TABLE cellSpacing=0 cellPadding=0 width=828 align=center border=0>
<TBODY>
<TR>
<TD vAlign=top width=828 bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width="92%" align=center border=0>
<TBODY>
<TR>
<TD width="55%"><DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD colSpan=2><DIV align=right><IMG height=90
src="http://www.inklineglobal.com/adsales/ads/tvo2/header3.gif"
width=794></DIV></TD>
</TR>
<TR>
<TD width="72%" height="244"><DIV align=left>
<TABLE cellSpacing=0 cellPadding=7 width="100%" border=0>
<TBODY>
<TR>
<TD colspan="2" vAlign=center class="style1">If you're like most PC users, you probably feel that there's more you can do on your PC other than working. And you know what? Your 're right! In the next 2 minutes, we are going to show you the secrets to turn your PC into a Super TV that lets you experience a whole new world of live TV entertainment and news!</TD>
</TR>
<TR>
<TD vAlign=center width="25%"><P><SPAN class=style2><span class=style17><img height=89
src="http://www.inklineglobal.com/adsales/ads/tvo2/bored_sm2_1.jpg" width=122
align=left></span></SPAN></P></TD>
<TD width="75%"><SPAN class=style17><b>
<font size="3" color="#FF9933">Watch TV Anytime
You Want!</font></b><BR>
Imagine: Its 5 minutes away from your favorite show on TV. And youre still stuck in front of your computer with no television nearby. <br>
<br>
Instead of bringing a TV into your office, what if you could <strong>Turn your PC into a Super TV RIGHT NOW?</strong></SPAN></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=7 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=center width="76%"><P><b>
<font face="Arial" color="#008000">Take A Quick
TV Break!</font></b><BR>
<SPAN
class=style17>Are you feeling that the day is getting too long and you're falling asleep at your desk? Sneak in a quick energizer. Let us show you how to use your PC to <strong>catch a comedy</strong> just to brighten your day, update yourself with a <strong>quick news clip</strong>, or watch your favorite artist's <strong>music video</strong>
in one click!</SPAN></P></TD>
</TR>
</TBODY>
</TABLE>
</DIV></TD>
<TD valign=top width="28%"><DIV align=right>
<IMG height=46 src="http://www.inklineglobal.com/adsales/ads/tvo2/head2_2.jpg"
width=211>
<table width="100%" height="171" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="171"><img src="http://www.inklineglobal.com/adsales/ads/tvo2/select_3.gif" width="209" height="133" border="0"></td>
</tr>
</table>
<div align="left"><BR>
</div>
</DIV></TD>
</TR>
</TBODY>
</TABLE>
</DIV></TD>
</TR>
<TR>
<TD><SPAN class=style1></SPAN>
<TABLE cellSpacing=0 cellPadding=7 width="100%" border=0>
<TBODY>
<TR>
<TD height="380"><TABLE cellSpacing=0 cellPadding=7 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=center width="17%"><DIV align=center><SPAN class=style2><SPAN class=style1><IMG height=89
src="http://www.inklineglobal.com/adsales/ads/tvo2/p3_1.jpg" width=122
align=left></SPAN></SPAN></DIV></TD>
<TD width="83%"><b>
<font face="Arial" color="#FF0000">Never Miss
Your Favorite Programs Again!</font></b><BR>
<SPAN class=style1>You're traveling outside of town and desperately homesick.
What's more, you feel like screaming because you forgot to record your favorite show before you left. <br>
<br>
Don't be the last to find out what happened in the show and let this spoil the whole series for you. Now <strong> watch your favorite shows whereever you are, whenever you want to!</STRONG></strong></SPAN></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=7 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=center width="18%"><span class=style2><span class=style17><img height=89
src="http://www.inklineglobal.com/adsales/ads/tvo2/p4_1.jpg" width=122
align=left></span></span></TD>
<TD width="82%"><SPAN class=style2>
<font size="3">Download An Extra TV Into Your
Home!</font><BR>
</SPAN><span class="style1">Maybe you have to fight with someone else for the remote when both of you want to watch TV at the same time. Do you wish<strong> you had another TV</strong> just so you can <strong>watch TV in peace</strong>, or even to <strong>put a TV beside your PC</strong> so that you don't have to step away from your computer. <br>
<br>
There's a better idea. What if you could <strong>watch TV on your PC</strong>?</span></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=7 width="100%" border=0>
<TBODY>
<TR>
<TD width="18%" height="160" vAlign=top><div align="center"><SPAN class=style2><SPAN class=style1><IMG
height=89 src="http://www.inklineglobal.com/adsales/ads/tvo2/p5_1.jpg" width=122></SPAN></SPAN></div></TD>
<TD width="82%"><b>
<font face="Arial" color="#FF00FF">Never Be
Bored Again!</font></b><BR>
<SPAN
class=style1>Sick of the same old shows, same old channels on TV every single day? Tired of watching reruns? Hey, there's only so much variety with that little number of channels available to you. <br>
<br>
You may not realize it yet, but there is a <strong>better alternative to boring TV</strong>. How would you like <strong>Instant Access</strong> to<br>
</SPAN>
<table width="95%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="9%" height="81"><p><img src="http://www.inklineglobal.com/adsales/ads/tvo2/pinkarrow.gif" width="50" height="75" align="right"></p></td>
<td width="91%"><p><SPAN
class=style17> 1000+ channels and clips<br>
</SPAN><SPAN
class=style17>The Latest Movie Trailers <br>
</SPAN><SPAN
class=style17>The Hottest Music Videos<br>
</SPAN><SPAN
class=style17>Shows from Around the country and Around the World<br>
....And Much More!</SPAN></p>
</td>
</tr>
</table>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=center width="27%"><DIV align=center><img src="http://www.inklineglobal.com/adsales/ads/tvo2/animatedTVO_2.gif" width="150" height="120"></DIV></TD>
<TD width="73%"><FONT face="Arial, Helvetica, sans-serif" size=3><B><A
onclick=DoSetVisitedCookie(); href="http://www.inklineglobal.com"><IMG height=24
src="http://www.inklineglobal.com/adsales/ads/tvo2/logo3D.gif" width=136
align=top border=0></A> proudly presents PCShowBuzz <SUP>TM</SUP></B></FONT><BR>
<ul>
<li><span class="style2"> Start Watching TV On Your PC In Minutes!</span></li>
<li><span class="style2">Get More Than 1000+ Channels And Clips Absolutely Free!</span></li>
<li><span class="style2">No Hidden Cost And No Hardware Required!</span></li>
</ul></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD vAlign=top><TABLE cellSpacing=0 cellPadding=10 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top><DIV>
<div align="center">
<center>
<table width="692" height="529" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="692" valign="top" background="http://www.inklineglobal.com/adsales/ads/upsizetv.gif"><table width="100%" height="417" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="29%" height="417" valign="top"> </td>
<td width="66%" valign="top"><p> </p>
<p><br>
<br>
<object id="MediaPlayer" width="457" height="340" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
standby="Loading Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="http://www.inklineglobal.com/adsales/video.asx">
<param name="ShowControls" value="true">
<param name="ShowStatusBar" value="true">
<param name="ShowDisplay" value="false">
<param name="autostart" value="true">
<param name="stretchToFit" value="true">
<embed type="application/x-mplayer2" src="http://www.inklineglobal.com/adsales/video.asx" name="MediaPlayer"
width="457" height="340" showcontrols="1" showstatusbar="1" showdisplay="0" autostart="1" stretchtofit="true"> </embed>
</object>
</p>
</td>
<td width="5%" valign="top"> </td>
</tr>
</table></td>
</tr>
</table>
</center>
</div>
<p>
<span class="style34">FACT: YOU CAN WATCH TV ON YOUR PC</span><br>
<span class="style1">You don't realize it, but you can do all of the above in minutes. Sounds fantastic? Get the most out of your time and your PC now with PCShowBuzz. PCShowBuzz turns your PC into a SuperTV and gives you free, instant access to more than 1000 channels and clips. Why buy another TV and pay monthly subscription for cable when you can get all the entertainment and news you'll ever need for less
than the price of 4 value meals?</span> </p>
<P class=style17><SPAN class=style2>1) Connect To A Whole New World On Online Entertainment:</SPAN> Catch breaking news, the hottest fashions, the latest movie trailers, sports highlights and more from thousands of channels you can watch with PCShowBuzz. What are you waiting for? Get connected now!</P>
<P class=style17><SPAN class=style2>2) No Ads Or Spyware! </SPAN>We do not secretly install adware or spyware with PCShowBuzz. The one time purchase price is all you ever pay to use this product for life.</P>
<P class=style17><SPAN class=style2>3) No Recurring Charges... Ever!</SPAN> This is not like monthly-subscription cable or pay-per-view TV. You only pay once to enjoy unlimited TV programs. Get all the entertainment you need for a one time payment of <script language="javascript">
PrintCurrencyDenomination();
PrintPrice('29_95');
</script>!</P>
<P class=style34>Unlimited Entertainment And News At An Unbeatable Price<SPAN
class=style17><IMG height=136
src="http://www.inklineglobal.com/adsales/ads/tvo2/unlimited.jpg" width=116
align=right></SPAN></P>
<P class=style17>What about Pay-Per-View programming? Or even monthly cable subscription? Some of these charges have to be paid month after month after month. If you add all this costs up you may end up paying hundreds
just to watch tv. What about the unnecessary extra hardware just to get all this set up? </P>
<P class=style17>You DONT get all these extra costs with PCShowBuzz. We can easily charge a high price for PCShowBuzz, but then not many people would be able to afford and use it. Call it an
ego trip, but the fact is, we're so proud of this powerful software that we want to help as many people to use it as possible.</P>
<TABLE borderColor=#0055ad cellSpacing=0 cellPadding=2 width="82%" align=center
bgColor=#e6f0ff border=1>
<TBODY>
<TR>
<TD width="100%"><P align=left><SPAN class=style17><strong>PCShowBuzz is the product of more than 6 years of engineering and online TV experience.</strong> The development cost of this product is more than <!--$148,650-->
<script language="javascript">
PrintCurrencyDenomination();
document.write('148,650');
</script>, taking more than 2 years to develop and 6 months of intensive testing and user feedback to develop. This program was literally created by people who spend all their time in front of computers, just so that they can watch TV on their computer. </SPAN> <FONT
face="Arial, Helvetica, sans-serif"
size=2><B></B></FONT></P></TD>
</TR>
</TBODY>
</TABLE>
<P class=style12 align="center"><strong>
<font size="5" color="#990000">Here are just a few
channels out of the thousands available to you:</font></strong><br>
<br>
<img src="http://www.inklineglobal.com/adsales/graphics/channellig2.gif" width="326" height="130"><br>
<br>
<br>
If You're Willing To Spend Upwards Of <script language="javascript">
PrintCurrencyDenomination();
document.write('100');
</script> On TV Or Even Cable, How Much Would You Spend On A Program that:</P>
<UL>
<LI><SPAN class=arpt>Turns Your PC Into A Super TV. </SPAN>
<LI class=arpt>Gives You Instant Access To Thousands
Of TV Channels And Clips!
<LI class=arpt>Does Not Require Extra Hardware.
<LI class=arpt>Lets You Start Watching In Minutes.
<LI class=arpt>Is Easy to use, No PC knowledge Required. </LI>
<LI class=arpt>Has No Hidden Costs, No Recurring Charges,
Ever. </LI>
</UL>
<P class=style26>So How Much Does PCShowBuzz Cost?<BR>
Order Today, And Get This Amazing Program At An Amazing Low Price Of Only <script language="javascript">
PrintCurrencyDenomination();
PrintPrice('29_95');
</script>! Take Advantage Of This Offer Before It Expires! </P>
<P class=style17>More than 1 million users are already enjoying the fantastic variety and value offered by online TV. Are you ready to experience PCShowBuzz?</P>
<P class=style17>What's more, if you order now, we're including these additional bonuses if you download PCShowBuzz today.</P>
<P class=style34>Get Unbeatable Value Only Through This Online Offer.<FONT
face=Arial><FONT size=2></FONT></FONT></P>
<DIV>
<DIV>
<DIV class="337120107-01092005">
<DIV><FONT face=Arial><FONT size=2>There are few products in the market that gives you all these features, and even then, they'll cost you hundreds of unnecessary dollars in extra hardware expenses and recurring charges. Or else, it may cost you at least <script language="javascript">
PrintCurrencyDenomination();
document.write('100');
</script> to buy a cheap television, then another <script language="javascript">
PrintCurrencyDenomination();
PrintPrice('35_00');
</script> a month just to get basic cable with only 50+ channels. And that's not counting rental for the box. <SPAN
class=672381710-01092005> </SPAN></FONT></FONT></DIV>
<DIV><FONT size=2><SPAN class=672381710-01092005></SPAN></FONT><br>
<FONT face=Arial><FONT
size=2><strong>More than 1 million users</strong> are already enjoying the fantastic variety and value offered by online TV. Are you ready to experience PCShowBuzz? <BR>
</FONT></FONT></DIV>
</DIV>
<DIV class="337120107-01092005">
<DIV class=518464807-30082005></DIV>
</DIV>
</DIV>
&nb
its way too long. i sent a pm to you. thanks