[thelist] Pop up window on exit
Rich Points
rich at richpoints.com
Wed Dec 14 13:10:56 CST 2005
Thanks Volkan I'll give this a try.
I'm setting this up on a non profit site. They're doing a fund raising
drive and they want the pop up to come up when the visitor exits the
site. The message will say something like "did you find the information
on our site useful...please make a donation to further our work".
Thanks again
Rich
VOLKAN ÖZÇELI.K wrote:
>>Can someone point me to a good JavaScript that will render a pop up and
>>set a cookie on exit?
>>
>>
>
>1. First inform *clearly* on the page that the user(s) should disable
>pop-up blockers to see the really really important window which pops
>up on window unload.
>
>2. Secondly attach a handler to the unload event:
>
><script type="text/javascript>
>window.onunload=window_unload;
>
>function window_unload(evt){
>WindowObjectReference = window.open("http://www.cnn.com/", "CNN_WindowName",
>"menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes");
>}
></script>
>
>(surely, people will want to visit CNN after the page unloads)
>
>The script was taken and modified from
>
>http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html
>
>it was the second link when googling "window.open".
>
>Just out of curiosity, I wonder the importance of that pop-up:
>
>Is it a "thank you for visiting our site" page of some sort, or a
>questionaire that pops asking whether your visitors liked the site or
>not.
>
>And finally, is there a URL that we may have a look at?
>
>
>HTH,
>--
>Volkan Ozcelik
>+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
>+> My projects/studies/trials/errors : http://www.sarmal.com/
>
>
More information about the thelist
mailing list