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>
Share:
19,647
copenndthagen
Author by

copenndthagen

Buy some cool JavaScript related merchandise from; https://teespring.com/stores/technical-guru-2

Updated on June 04, 2022

Comments

  • copenndthagen
    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
    copenndthagen about 13 years
    Is there any other way and what will be the difference in behavior/browser output if I use target="_blank" Vs window.open ?
  • Groovetrain
    Groovetrain about 13 years
    In 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
    Ben Konrath over 7 years
    target="_new" shouldn't be used. Use target="_blank". stackoverflow.com/questions/4964130/…