Javascript with expiring cookie

Discussion in 'Javascript' started by Mo, Feb 1, 2004.

  1. Mo

    Mo Guest

    I am looking for a JavaScript that will allow me to open a pop-up
    window "onUnload". The pop-up window should set a cookie on the users
    computer that expires in 'n' number of days.
     
    Mo, Feb 1, 2004
    #1
    1. Advertising

  2. Mo

    Randy Webb Guest

    Mo wrote:

    > I am looking for a JavaScript that will allow me to open a pop-up
    > window "onUnload". The pop-up window should set a cookie on the users
    > computer that expires in 'n' number of days.


    So, after I leave your site, you want to *attempt* to annoy me by
    opening yet another ad window?

    And *if* I allow the cookie, do I get cyber-milk with it?

    Stop trying to annoy people after they have left your site. They are
    gone, let them go in peace.

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Randy Webb, Feb 1, 2004
    #2
    1. Advertising

  3. Mo

    Tim Williams Guest

    "Cardman" <> wrote in message
    news:eek:...
    > On Sun, 01 Feb 2004 13:35:12 +0000, Randy Webb
    > <> wrote:
    > <trim>
    > Just what do you have against cookies by the way? When being able to
    > recognize what one of your customers it is when they visit your site
    > has always seemed like a good idea to me, when you can welcome them
    > with like "Hello Randy, Welcome Back!".
    >
    > Cardman
    > http://www.cardman.com
    > http://www.cardman.co.uk


    I've always thought that was more creepy than anything else. Anyway,
    what has opening a new window got to do with setting a cookie? This
    can be done anytime from the main window.

    Tim.
     
    Tim Williams, Feb 1, 2004
    #3
  4. On Sun, 01 Feb 2004 22:23:22 +0000, Cardman <> wrote:

    > On Sun, 01 Feb 2004 13:35:12 +0000, Randy Webb
    > <> wrote:
    >
    >> Mo wrote:
    >>
    >>> I am looking for a JavaScript that will allow me to open a pop-up
    >>> window "onUnload". The pop-up window should set a cookie on the users
    >>> computer that expires in 'n' number of days.

    >>
    >> So, after I leave your site, you want to *attempt* to annoy me by
    >> opening yet another ad window?
    >>
    >> And *if* I allow the cookie, do I get cyber-milk with it?
    >>
    >> Stop trying to annoy people after they have left your site. They are
    >> gone, let them go in peace.

    >
    > Well, there are valid uses for this function don't forget, even if
    > better options could exist.


    [snip]

    The onunload intrinsic event is unreliable and should be avoided. Browsers
    consider different things "unload events". For example, I think IE fires
    onunload when a page changes, is refreshed, and when the window is closed.
    Opera only fires it when the page is changed. I haven't got around to
    installing Netscape and Mozilla, so I can't compare them.

    Mike

    --
    Michael Winter
    d (replace ".invalid" with ".uk" to reply)
     
    Michael Winter, Feb 2, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer

    HELP: Cookie keeps expiring!

    VB Programmer, Nov 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    429
    VB Programmer
    Nov 3, 2003
  2. =?Utf-8?B?TWlrZQ==?=

    Forms Authenication Cookie Not Expiring Correctly

    =?Utf-8?B?TWlrZQ==?=, Jun 7, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    531
    =?Utf-8?B?TWlrZQ==?=
    Jun 7, 2004
  3. rh.krish
    Replies:
    0
    Views:
    742
    rh.krish
    Apr 9, 2008
  4. Replies:
    3
    Views:
    812
    Matthijs Krempel
    Apr 10, 2008
  5. VB Programmer

    HELP: Constantly expiring cookie!!! :(

    VB Programmer, Nov 3, 2003, in forum: ASP .Net Security
    Replies:
    1
    Views:
    193
    Andre
    Nov 8, 2003
Loading...

Share This Page