How can I indicate that a popup has been blocked by Safari?
19,647
The only way that I know of to get a new window to open up in Mobile Safari is to use the target="_blank"
(and I guess target="_new"
) attribute.
<a href="my_popup_page.html" target="_blank">Open 'popup'</a>
Author by
copenndthagen
Buy some cool JavaScript related merchandise from; https://teespring.com/stores/technical-guru-2
Updated on June 04, 2022Comments
-
copenndthagen almost 2 years
In Safari for iPad, if the popups are disabled, is there any way to get the bar at the top..like in IE which says "...website trying to open popup.."
I mean the user can at least come to know there is some popup being opened..
Otherwise if the popup setting is blocked, nothing happens when the user clicks on a link which has that popup.
-
copenndthagen about 13 yearsIs there any other way and what will be the difference in behavior/browser output if I use target="_blank" Vs window.open ?
-
Groovetrain about 13 yearsIn normal browsers, you'll have no control over things like showing/hiding the menu bar, address bar, and the size of the window. And you also won't get a JS reference to the page that you opened. But if you don't mess with those things anyway, it should behave similarly.
-
Ben Konrath over 7 years