开发者

iPad safari modalpopup issue

I am developing a web开发者_Go百科 application which is compatible with iPad.

Earlier I was testing on iOS version 3.2, and all modal dialog popups are returning values just fine to the parent window. But after upgrading my iOS to 4.3, it is behaving odd. Now, on iPad, it is returning a value, but is not updating the field until I click on another field or the same field (HTML text field).

I am opening modal popup using window.open();

And returning using window.opener.oaEventiPad(retValArray); oaEventiPad is function which is responsible for setting updated value.

Can anyone please help ??

Thanks,


I am through the similar issue. I open a popup suing window.open in my asp .net application which is supposed to be compatible with iPad. Value has successfully been returned when I use IE, Chrome, FireFox and Safari (on PC with windows 7).

Unfortunately the same code fails in Safari when I access the application through iPad. On iPad domObject is prompted on new window open instead of prompting returned value on new window close.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜