Need Help Please - Can't Close Window on iPhone

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Need Help Please - Can't Close Window on iPhone


I've put the following code into the header of a .php page to get the Shadowbox popup to appear after a short delay after the page is loaded:

<script type="text/javascript"> Shadowbox.init({ handleOversize: "drag", displayNav: "false", viewportPadding: "1", }); function openwindow() {{ content: "", player: "iframe", height: 500, width: 500, }); }; if ($.cookie('guest') != '1') { window.onload = function() {setTimeout (openwindow, 2500); }; $.cookie('guest', '1') }; </script>

I also added a link to the "" popup to close the window:
            <a href="#" onclick="window.parent.Shadowbox.close();" style="float:right"/>Close Window

The "Close Window" link works on my laptop, in both Firefox and Safari, but does nothing on my iphone or ipad.  I can close the window but clicking outside of it, but that's not the solution I want.  I'm not sure what the problem is.  

Any help would be greatly appreciated.