Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how to pop an exit console correctly

Reply
Thread Tools

how to pop an exit console correctly

 
 
John Hoge
Guest
Posts: n/a
 
      05-25-2004
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?
 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      05-25-2004
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/
 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      05-26-2004
In article <(E-Mail Removed)> , 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Exit code of a batch (using exit /B) Joe Smith Java 4 11-08-2006 12:25 PM
Code to Exit Web App and Exit Internet Explorer =?Utf-8?B?U2FuZHk=?= ASP .Net 7 08-05-2005 01:55 AM
Can someone help me get this sub to exit correctly? Teep ASP .Net 1 06-27-2004 03:27 AM
compiler does not terminate correctly - exit code 1073741819 tom Java 0 12-11-2003 03:23 PM



Advertisments