sharing small pieces of rocks or jewels I find on the way

Popup blocked

I was making search while I found that, popup blocker blocked the new window. I used window.open(). Many body said it is because popup blockers notice window.open(), but I thought there is no reason for that, because I have used window.open several times before and never faced this! Then Arafat bhai said me, popup blocker will block if I use onkeydown, if I use onkeypress, it will not block!!! Thanks Arafat bhai

I found there are other interesting solutions though, one is if you create a form with method get and target _blank, later in the JavaScript, set the action to the desired URL. Another way I found others using is, since after clicking a button a window.open is allowed, button clicking is provoked.

But, safest is I think the get form method, since there may be some dumb popup blocker which will disallow all window.open()

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: