Window.open and pop up blocker

S

Stephane

Hi,

I have a contact page which is opening in a new window using
window.open. Since this is called when the user clicks a link, pop up
blocker don't block it.

However, I want to show a survey after this window has been closed. I
find nothing else but to use window.open. But this time, I use the
onunload tag in the opened window. This is blocked by pop up blockers.

Is there a way to print my survey, whatever it is, from a window
opened by the user and poping on the onunload event?

Thanks for any idea,

Stephane
 
R

Richard Cornford

Stephane said:
I have a contact page which is opening in a new window using
window.open. Since this is called when the user clicks a link,
pop up blocker don't block it.

Only some pop-up blockers don't block pop-ups that result from user
interaction, other do. As it is a contact page that is opening in the
pop-up you may easily convince yourself that pop-up blockers are not a
problem with it, as you will never be contacted by anyone using a
blocker that does block the new window.
However, I want to show a survey after this window has been
closed. I find nothing else but to use window.open. But this
time, I use the onunload tag in the opened window. This is
blocked by pop up blockers.

That is exactly the sort of abusive use of scripted new windows that
pop-up blockers were introduced to prevent.
Is there a way to print my survey, whatever it is, from a window
opened by the user and poping on the onunload event?
No.

Thanks for any idea,

Provide a link to your survey on your site and let the users navigate
their current browser window to it if and when they are interested. Any
that are not interested will be actively annoyed by being presented with
a survey window if you were able to open one reliably. It is precisely
because you have a desire to deprive the user of a choice when it comes
to opening new windows that makes this action abusive, and has rendered
it non-viable.

Richard.
 
M

Mark Preston

Stephane said:
I have a contact page which is opening in a new window using
window.open. Since this is called when the user clicks a link, pop up
blocker don't block it.
Some certainly will.
However, I want to show a survey after this window has been closed. I
find nothing else but to use window.open. But this time, I use the
onunload tag in the opened window. This is blocked by pop up blockers.
Naturally.

Is there a way to print my survey, whatever it is, from a window
opened by the user and poping on the onunload event?
Well, I have to say Stephanie, the more often I see people who are
trying to do exactly the sort of abusive use of pop-ups the blockers
were designed to stop, the more it makes me laugh. The simple answer is
the obvious one...

Don't use pop-ups. We don't like them and don't want them.
 
S

Scott Orsburn

Stephane said:
However, I want to show a survey after this window has been closed. I
find nothing else but to use window.open. But this time, I use the
onunload tag in the opened window. This is blocked by pop up blockers.
You might put a link or button on the window the user opened with the
label "Done" or something similar. When the user clicks the
link/button, the survey could be loaded into this same window. Then
when the survey is finished, the window can be closed upon submit. (I
would shy away from using the lable "Close" since the window won't
actually be closed right away.)

I can't say how this will impact the UI of the window.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top