Reputation: 24019
I have a js bookmarklet which works perfectly on all browsers. It spawns a pop up window when clicked. Apart from the iPad - it spawns a new tab as opposed to a pop up
NOTE: I have turned OFF the Block Pop-ups feature in Safari
This is the bookmarklet code I use:
javascript:(function(){window.open('http://****.com/pages/bm/add.html?
page_title='+document.title+'&rl='+encodeURIComponent(window.location.href),
'bookmarklet','left=100,top=100,width=610,height=700,personalbar=0,toolbar=0
,scrollbars=1,resizable=1')})()
Upvotes: 0
Views: 188
Reputation: 7599
Clarification to the previous two answers, it's possible, but you can't rely on that behaviour because it's a user preference:
By default, Safari on iOS blocks pop-up windows. However, it is a preference that the user can change. To change the Safari settings, tap Settings followed by Safari. The Block Pop-ups setting appears in the Security section. From: http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html
This is a view source bookmarklet that pops open a new window. Try this one out to see if it works:
javascript:(function()%7Bvar%20a=window.open(%22about:blank%22).document;a.write(%22%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20%22+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement(%22pre%22));b.style.overflow=%22auto%22;b.style.whiteSpace=%22pre-wrap%22;b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
Upvotes: 1
Reputation: 5975
iOS doesn't do popups, just tabs. For the record, Android does tabs.
Upvotes: 1