<bdo id='GJbh4'></bdo><ul id='GJbh4'></ul>
      <legend id='GJbh4'><style id='GJbh4'><dir id='GJbh4'><q id='GJbh4'></q></dir></style></legend>

      1. <tfoot id='GJbh4'></tfoot>
      2. <small id='GJbh4'></small><noframes id='GJbh4'>

        <i id='GJbh4'><tr id='GJbh4'><dt id='GJbh4'><q id='GJbh4'><span id='GJbh4'><b id='GJbh4'><form id='GJbh4'><ins id='GJbh4'></ins><ul id='GJbh4'></ul><sub id='GJbh4'></sub></form><legend id='GJbh4'></legend><bdo id='GJbh4'><pre id='GJbh4'><center id='GJbh4'></center></pre></bdo></b><th id='GJbh4'></th></span></q></dt></tr></i><div id='GJbh4'><tfoot id='GJbh4'></tfoot><dl id='GJbh4'><fieldset id='GJbh4'></fieldset></dl></div>

        javascript 弹出问题在 Internet Explorer 中!

        javascript popup issue In Internet Explorer !(javascript 弹出问题在 Internet Explorer 中!)
            <tbody id='yOboc'></tbody>
        • <i id='yOboc'><tr id='yOboc'><dt id='yOboc'><q id='yOboc'><span id='yOboc'><b id='yOboc'><form id='yOboc'><ins id='yOboc'></ins><ul id='yOboc'></ul><sub id='yOboc'></sub></form><legend id='yOboc'></legend><bdo id='yOboc'><pre id='yOboc'><center id='yOboc'></center></pre></bdo></b><th id='yOboc'></th></span></q></dt></tr></i><div id='yOboc'><tfoot id='yOboc'></tfoot><dl id='yOboc'><fieldset id='yOboc'></fieldset></dl></div>
          • <legend id='yOboc'><style id='yOboc'><dir id='yOboc'><q id='yOboc'></q></dir></style></legend>

              <small id='yOboc'></small><noframes id='yOboc'>

            1. <tfoot id='yOboc'></tfoot>
                <bdo id='yOboc'></bdo><ul id='yOboc'></ul>

                1. 本文介绍了javascript 弹出问题在 Internet Explorer 中!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  i have Problem with opening popups in javascript i have this function to open my popups in IE6 and IE7:

                  function open_window(Location,w,h) //opens new window
                  {
                    var win = "width="+w+",height="+h+",menubar=no,location=no,resizable,scrollbars,top=500,left=500";
                    alert(win) ;
                    window.open(Location,'newWin',win).focus();
                  
                  }
                  

                  it's working . i mean my new window opens but an error occurs. The Error Message is :

                  'window.open(...)' is null is not an object.
                  do you want to countinue running script on this page ?

                  then i have button in onclick event it's will call a function to close current window an refresh the opener function is

                  function refreshParent(location) 
                  {
                    window.opener.location.href = location ; 
                    window.close();
                  }
                  

                  it's also gives me error : window.opener.location is null or not an object but i'm sure i'm passing correct parameters

                  i call it like this :

                  for second part :

                  <input type="button" name="pay" value="test" onclick="refreshParent('index.php?module=payment&task=default')" >
                  

                  for first part :

                  <a onclick="javascript:open_window('?module=cart&task=add&id=<?=$res[xproductid]?>&popup=on','500' , '500')"  style="cursor:pointer" id="addtocard"> <img src="../images/new_theme/buy_book.gif" width="123" border="0"/> </a>
                  

                  it's really confuse me . Please Help ;)

                  解决方案

                  When popup windows opened using window.open are blocked by a popup blocker, a feature of pretty much any modern browser these days, the return value of window.open() is not a window object, but null.

                  In order to circumvent these issues you would need to test the value returned by window.open() before attempting to invoke any methods on it.

                  Below is a piece of code to demonstrate how to go around this problem:

                  function open_window(Location,w,h) //opens new window
                  {
                    var options = "width=" + w + ",height=" + h;
                    options += ",menubar=no,location=no,resizable,scrollbars,top=500,left=500";
                  
                    var newwin = window.open(Location,'newWin',options);
                  
                    if (newwin == null)
                    {
                      // The popup got blocked, notify the user
                      return false;
                    }
                  
                    newwin.focus();
                  }
                  

                  In general, popup windows should be used only as a last resort or in controlled environments (internal company website, etc). Popup blockers tend to behave in very inconsistent ways and there may be more than a single popup blocker installed in a given browser so instructing the user on how to allow popups for a given website is not necessarily a solution. Example: IE7 + Google toolbar = two popup blockers.

                  If I may suggest, perhaps you should consider using something like this: http://jqueryui.com/demos/dialog/

                  The advantages are numerous:

                  1. Skinnable, so you can create a more consistent look to match your website.
                  2. No popup blockers.
                  3. Good API and documentation that is consistent across most, if not all, major browsers.

                  If you still require that the newly opened "window" contain an external URL, you could use an IFRAME inside the opened dialog window.

                  Hope this helps,

                  Lior.

                  这篇关于javascript 弹出问题在 Internet Explorer 中!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                  Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                  Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                  How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                  Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                  Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))
                    <bdo id='hTmei'></bdo><ul id='hTmei'></ul>
                    <tfoot id='hTmei'></tfoot>

                  • <small id='hTmei'></small><noframes id='hTmei'>

                    <i id='hTmei'><tr id='hTmei'><dt id='hTmei'><q id='hTmei'><span id='hTmei'><b id='hTmei'><form id='hTmei'><ins id='hTmei'></ins><ul id='hTmei'></ul><sub id='hTmei'></sub></form><legend id='hTmei'></legend><bdo id='hTmei'><pre id='hTmei'><center id='hTmei'></center></pre></bdo></b><th id='hTmei'></th></span></q></dt></tr></i><div id='hTmei'><tfoot id='hTmei'></tfoot><dl id='hTmei'><fieldset id='hTmei'></fieldset></dl></div>
                          <tbody id='hTmei'></tbody>

                        1. <legend id='hTmei'><style id='hTmei'><dir id='hTmei'><q id='hTmei'></q></dir></style></legend>