弹出窗口不会弹出不同的窗口,而是显示在iPad safari的主屏幕上

时间:2013-12-19 08:13:34

标签: java javascript ipad

   popup window will not popup on different window, instead it is displaying on the primary screen on iPad safari browser. works fine on all the other browsers.
       using iframe tag,   


 <div class="formGroup" >
                        <button class="primary" id="" name=""
                        type="button" onClick="somefunction();"  value="">buttonvalue</button>
                        </div>


function some-function(){
        var URL = '<bean:write name="systemDto" property="documenturl"/>'; 
      checks if user want to save or open the document      
       document.form.action = URL+ "?documentName=somedoc";
            form.submit();
             return 0;
          }

需要添加什么才能使其在iPad浏览器中运行         请帮助我们!!

1 个答案:

答案 0 :(得分:0)

您应该在不同的窗口中尝试使用此代码打开弹出窗口。

我已在新窗口中添加document.form.target = "_blank";以打开弹出窗口。

function somefunc(exptype) {
            getSelectedText();
            var reportURL = '<bean:write name="systemDto" property="documenturl"/>';
            var somevalue = '';
            if (checkFields() > 0) {
                //validating all input parameters 
                //set the export type document.form.elements["Type"].value = exptype; 
                var frm = document.form;
                document.form.elements["sysdto.datavalue"].value = somevalue;
                document.reportForm.action = "getItcLeadsReport.do";
                if (exptype == digitvalue) {
                    document.form.action = URL + "?documentName=somereport";
                     var IS_IPAD = navigator.userAgent.match(/iPad/i) != null;
                     if (IS_IPAD == true) 
                     {
                       document.form.target = "_blank";
                     }                          
                 }
                frm.submit();
            }
            return 0;
        }