I am experiencing a similar problem. I open a su popup. window in my asp.net application which should be compatible with iPad. The value is successfully returned when I use IE, Chrome, FireFox and Safari (on a PC with windows 7).
Unfortunately, the same code does not work in Safari when I access the application through the iPad. On iPad, domObject suggests opening in a new window instead of requesting a return value in a new window.
Below is the code. Parent window:
enter code here <script type="text/javascript"> function modalWin() { //alert('clicked'); if (window.showModalDialog) { retVal = window.showModalDialog("About.aspx", "name", "dialogWidth:255px;dialogHeight:250px"); alert(retVal); } else { retVal = window.open('About.aspx', 'name', 'height=255,width=250,toolbar=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no ,modal=yes'); alert(retVal); } } </script> //HTML <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <a title="Test New Popup" onclick="modalWin();">New Popup for all browsers.</a>. </asp:Content>
New page:
<script type="text/javascript"> function closeIt(tempValue) { window.returnValue = tempValue; window.close(); } </script> //HTML: <input id="btnButton1" value="btnButton1" type="button" title="Press it to Close" onclick="closeIt('btnButton1');" /> <br /> <input id="btnButton2" value="btnButton2" type="button" title="Press it to Close" onclick="closeIt('btnButton2');" /> <br /> <input id="btnButton3" value="btnButton3" type="button" title="Press it to Close" onclick="closeIt('btnButton3');" />
Kamran
source share