Open pop-up on close

Discussion in 'Web Design and Development' started by janitorC7, Oct 19, 2007.

  1. janitorC7 macrumors 6502a

    janitorC7

    Joined:
    Feb 10, 2006
    Location:
    North Hollywood, CA
    #1
    I know that this is a bad idea, I have already told this to my client, but I need to find a way to open a pop-up when a person trys to exit a page.

    thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
  3. janitorC7 thread starter macrumors 6502a

    janitorC7

    Joined:
    Feb 10, 2006
    Location:
    North Hollywood, CA
    #3
    slight change of plans

    I need to figure out how to create a java script alert that will open on window close, and then if they click ok will open a new page. This is out od the stuff i usually do, as I'm not in the business of being annoying
     
  4. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #4
    Wow, I'm sorry, but I would have to just simply tell the client, "No, I can't do that. It's against my religion."

    Anyways, you should be able to combine the normal alert command from JavaScript (don't recall it, I've been out of the loop for too long), with the onunload command mentioned earlier to produce that effect.

    jW
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    Luckily I don't believe that's possible, at least not directly. I saw some hacks for IE, but that was about it. The onunload, which I mentioned before is the closest thing, but I still don't like sites using them. Not many legit uses for it.
     
  6. janitorC7 thread starter macrumors 6502a

    janitorC7

    Joined:
    Feb 10, 2006
    Location:
    North Hollywood, CA
    #6
    okay, wow, I have to change my question again (client is giving me a head-ache).

    These types of 'hacks' are never somthing I really bothered to learn, UI and social networking, design ect. are really my things.

    but here is the new thing:

    I need to have a new window open, when they close the current window.

    The client is calling it a downsale, basically you decide you dont want to buy the product, they offer you a different product, for a lower price.

    Yes, I do not want to do this either, but at $75 an hour (their offer, not mine). I figure that I have to do it for them, so please if anybody has any ideas, I would very much appreciate it.

    Thanks!!

    JC7
     

Share This Page