473,414 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

how to pop an exit console correctly

I would like to open an exit pop when a user leaves my site, but I
don't want to the back button to trigger the pop if the user remains
in my site.

I'm using the onUnload attribute of the Body tag to do this. All
internal links set a variable of inSite to true on their onClick event
handler, so the exit pop will not open if the user follows an internal
link.

Should the user hit the back button, the pop will be displayed. Is
there a better, cleaner way to determine when the user has left a
site?
Jul 23 '05 #1
2 2257
John Hoge wrote:
I would like to open an exit pop when a user leaves my site, but I
don't want to the back button to trigger the pop if the user remains
in my site.
So, when they decide to leave your site, you either want to ask them if
they are sure "Are you sure you really want to leave my site", you want
to popup an advertisement "Hey, you left my site, will you buy
something?", or, you want to popup something else? Nice.....
I'm using the onUnload attribute of the Body tag to do this. All
internal links set a variable of inSite to true on their onClick event
handler, so the exit pop will not open if the user follows an internal
link.
I wont see the popup either way. Whether onSite or offSite. My popup
blocker ensures that I won't see it.
Should the user hit the back button, the pop will be displayed. Is
there a better, cleaner way to determine when the user has left a
site?


Yes, stop trying.

What happens if I open your main page, then I navigate to a sub-page,
and then type in the URL to the main page again. Should I get the popup?
I didn't navigate away from the page via a link, yet I would get the
popup even though I am still on your site?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
In article <d0*************************@posting.google.com> , jhoge123
@yahoo.com enlightened us with...
I would like to open an exit pop when a user leaves my site, but I
don't want to the back button to trigger the pop if the user remains
in my site.


God, I love my blocker software for IE and my option to turn off that
nonsense with Netscape and Opera.

Why in the world would you want to annoy people like that?
Either you're being irritating on purpose or you've coded something that
doesn't scale nicely and clean up after itself. Either way, stop that.
If your code is the problem, share. We can probably help you fix it.

--
--
~kaeli~
What if the Hokey Pokey IS what's it's all about?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Peter Steele | last post by:
I have a Windows application written in C# that I want to return a non-zero exit code when it it run. The problem is that as a Windows application, there doesn't seem to be a way to control this....
13
by: PeterZ | last post by:
Hi, Back to basics! My understanding is that the only way to exit a For-Next loop prematurely is with the 'break' keyword. How are you supposed to do that if you're inside a Switch...
8
by: Zeno Lee | last post by:
What is the best way to return an exit code from a VB.NET windows forms app? My Forms application is dual purpose. It is an interactive windows app. It is also automated and run via a script and...
1
by: Peter Oliphant | last post by:
I have a C++ Console application being written using VS C++.NET 2005 Express. It never crashes and seems to be working just fine. However, when I close the application via the Console 'X' exit...
19
by: ern | last post by:
Right now I'm using exit(0) to terminate my program. My program is a console .exe application. After the "exit(0)" line of code is encountered, the console application waits for an enter press,...
4
by: =?Utf-8?B?U3VyZXNoIE5hZ2FyYWphbg==?= | last post by:
Hello, I am trying to execute an application on a remote system. After checking several of the website I was managed to write a C# application do the same. But I am not able to track the Exit...
3
by: Rudi | last post by:
Hello, following problem: At program end or release an assembly a serial device should get a final exit sequence. How can I do this? With Dispose() it's no problem, but this assembly is used...
13
by: AliRezaGoogle | last post by:
Dear Members, I have a problem in the concepts of Monit.Enter and Monitor.Exit (Before everything I should say that I know how to solve this problem by using Monitor.Wait and I do not need a...
11
by: =?Utf-8?B?U3RldmVEQjE=?= | last post by:
Hi all. I'm using VS 2008 Express C++. I created a console application back in 1999, and updated it for VC++ 6.0 in 2001. I've updated again this past month, and have found enough differences...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.