Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: onunload

  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    New Coder
    Join Date
    Jul 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Example for what you want:

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

    I hope it's effect for you
    Do you know Hakki Ocal ?

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #4
    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
    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/.......

  • #5
    New Coder
    Join Date
    Jul 2002
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think I will just do a popup behind off of the default page, that way when they leave it is there.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •