Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-08-2002, 03:21 PM   PM User | #1
details
New Coder

 
Join Date: Jul 2002
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
details is an unknown quantity at this point
onunload

I am trying to make a popup that displays only when the user leaves the site, however, the onunload does it for only page it is listed on? Is there a script I can make to popup only when the user leaves the site, and not just the page?
details is offline   Reply With Quote
Old 07-08-2002, 04:12 PM   PM User | #2
MUBNET
New Coder

 
Join Date: Jul 2002
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
MUBNET is an unknown quantity at this point
Example for what you want:

...
<body onunload="javascript:window.open('adress');">
...

I hope it's effect for you
__________________
Do you know Hakki Ocal ?
MUBNET is offline   Reply With Quote
Old 07-08-2002, 05:38 PM   PM User | #3
tommysphone
Regular Coder

 
Join Date: Jun 2002
Posts: 262
Thanks: 0
Thanked 0 Times in 0 Posts
tommysphone is an unknown quantity at this point
try this

The only way I can see as the way round this - as you require the pop up when the site is left is to have a one page site, layered into sections to hold the content of the existing other pages and the unload event on the main page itself as it currently is.

Sorry if thats of no help but its my thought on your question
tommysphone is offline   Reply With Quote
Old 07-08-2002, 05:49 PM   PM User | #4
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
They way I have it done on my pop up generator is that when a perosn clicks on a link I have it validate that it is a link....and it will not shhot the pop up window....If the window is shut, it will pop it up....problem is with back button presses and forward button, it will pop up/.......
A1ien51 is offline   Reply With Quote
Old 07-08-2002, 06:07 PM   PM User | #5
details
New Coder

 
Join Date: Jul 2002
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
details is an unknown quantity at this point
I think I will just do a popup behind off of the default page, that way when they leave it is there.
details is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 02:52 AM.


Advertisement
Log in to turn off these ads.