Open pop-up on close

janitorC7

macrumors 6502a
Original poster
Feb 10, 2006
635
16
California
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
 

janitorC7

macrumors 6502a
Original poster
Feb 10, 2006
635
16
California
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
 

Mal

macrumors 603
Jan 6, 2002
6,251
17
Orlando
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
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,857
7
USA
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.
 

janitorC7

macrumors 6502a
Original poster
Feb 10, 2006
635
16
California
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.