HTML5 Popup Windows in Mobile Safari

Hello -- I am trying to run an HTML5 app on the iPad that allows for popup windows of a particular size and calling separate HTML files within mobile Safari. I see the window.open Javascript function does work and a new browser page comes up, though it appears fullscreen and otherwise ignores the attributes one usually gets with a Javascript popup (height, width, distance from left and top, etc.).

I could live with that -- however, Safari clearly ignores the window.close function, even on a kludgy, obvious anchor like:

Close This Window!

I have read in the Safari Developer documentation about this SafariBrowserWindow class but all my attempts at utilizing this for a "close window"-type functionality have failed.

Does anyone have any advice about opening and closing child windows in Safari on the iPad, with or without SafariBrowserWindow? Sample code will be hugely appreciated (hint hint, Apple!). EAGERLY seeking a prompt reply! Thanks for your attention.

iPad, iOS 4

Posted on Sep 2, 2010 8:23 AM

Reply
1 reply

Sep 2, 2010 9:48 AM in response to jimiayler

The window.close function is only available in Safari 5, and to the best of my knowledge Safari Mobile in iOS is not completely up to Safari 5, so it probably doesn't support the SafariBrowserWindow class. But you should probably take this up in one of the developer-oriented forums, either the forum available to registered members of the Apple Developer Program, or the developer forum on the Discussions. Someone on those areas may be able to confirm my understanding and, if that is correct, whether there's a workaround.

Regards.

Message was edited by: Dave Sawyer

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

HTML5 Popup Windows in Mobile Safari

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.