quaqualita
10-31-2002, 01:02 PM
I'm designing a web site with about 50 pages. I would like to add a "good-bye -pop-up", meaning to open a window when users are leaving my site. For example, when they leave the site a window opens that says 'thank you for visiting' or so.
I'm using the the on unload event in the body tag: <body on unload="window. open('page.htm')"> . This works as soon the user leaves that particular page where I edit this event in the body tag. However, it also opens when he goes to another page within my site (and it is some silly to say good-bye, while the user is still with me, right?)
What I would like to have is that the user can view different pages of my site and only when he actually leaves the site, then I want to the "good bye window" to pop up.
Can anybody help me out? Thanks in advance!
S.M.L.
I'm using the the on unload event in the body tag: <body on unload="window. open('page.htm')"> . This works as soon the user leaves that particular page where I edit this event in the body tag. However, it also opens when he goes to another page within my site (and it is some silly to say good-bye, while the user is still with me, right?)
What I would like to have is that the user can view different pages of my site and only when he actually leaves the site, then I want to the "good bye window" to pop up.
Can anybody help me out? Thanks in advance!
S.M.L.