IPad Safari modalpopup issue

I am developing an iPad compatible web application.

I used to test iOS version 3.2, and the pop-ups of the modal dialog box return values ​​only in the parent window. But after updating my iOS to 4.3, it behaves oddly. Now, on the iPad, it returns a value, but does not update the field until I click on another field or the same field (HTML text field).

I open a modal popup using window.open ();

And return using window.opener.oaEventiPad (retValArray); oaEventiPad is a function that is responsible for setting the updated value.

Can anyone help?

Thanks,

+7
source share
1 answer

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');" /> 
0
source

All Articles