English 中文(简体)
重新加载父窗口ie9访问被拒绝
原标题:reload parent window ie9 access denied

IE9不允许我从iframe内部重新加载父窗口。这是我的代码

  if(result != 0)
  {
     window.location.reload();
  }
  else
  {
     alert(alert_arr.fail_document_save);
  }
  return true;   

IE9输出:SCRIPT70:权限被拒绝

有解决办法吗?

问题回答
if(result != 0)
  {
    var selfUrl = unescape(parent.window.location.pathname);

    parent.window.location.replace(selfUrl);

    parent.window.location.href = selfUrl;
  }
  else
  {
     alert(alert_arr.fail_document_save);
  }
  return true;

根据这个答案





相关问题
Running jQuery command from modal window to affect main page

I m currently trying to write a jQuery script which opens a modal box then (upon user entry) changes a value on the original page. Currently I ve got the script working on just the page itself (...

Animate Window Resize (Width and Height) C# WPF

I m looking for some help on animating window resize of an open window! Cant seem to figure this one out! I m just using atm. this.Width = 500; Any help would be great! Thanks.

Cant drag and move a WPF Form

I design a WPF form with Window Style=None. So I Cannot see the drag bar in the form. How can I move the Form with WindowStyle=None Property?

Win32 CreateWindow() call hangs in child thread?

I m working on a portability layer for OpenGL (abstracts the glX and wgl stuff for Linux and Windows)... Anyhow, it has a method for creating a Window... If you don t pass in a parent, you get a real ...

WPF-XAML window in Winforms Application

I have a Winforms application coded in VS C# 2008 and want to insert a WPF window into the window pane of Winforms application. Could you explain me how this is done.

热门标签