Hi Friends,
I need to create an application that will open a popup
when the user closes a window. I can do that easily
via onUnload event of javascript but the catch is that
the popup must open only when we close the window and
not when we submit a form or click a link on the page.
Actually it is a survey which opens only when one
closes the window.
I think i am clear.
Any help will be apreciated.

--
Regards
Abhishek jain

The only way is with the "onUnload" attribute of the "body" command. You can cause alerts to appear, but trying to open a popup window will undoubtedly fail or cause problems with the vast majority of users. That is because popups are annoying and frequently blocked. I would strongly suggest you find another approach.

The only way is with the "onUnload" attribute of the "body" command. You can cause alerts to appear, but trying to open a popup window will undoubtedly fail or cause problems with the vast majority of users. That is because popups are annoying and frequently blocked. I would strongly suggest you find another approach.

What kind of other solution it may be. I want to open a survey if a person does not accept mine product.
Thanks for your advice if you could suggest more it would be great.
--
Regards
Abhishek Jain

If a user closes their browser window or navigates to a different page, then that's what the user wants to do. Anything that interferes with that process is going to cause irritation. The user should only be presented with a survey if they click a link to a survey.

If a user closes their browser window or navigates to a different page, then that's what the user wants to do. Anything that interferes with that process is going to cause irritation. The user should only be presented with a survey if they click a link to a survey.

Hii Guys,

Can anyone Got Solution for it?
We are having same problem, it open window on each time! And we don't want to open each time!
Any Help Will be needed, as i need to do it for one project!

Regardds,

Freelance / Freelancing Programmer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.