Javascript Window.Opener Object Null on .NET WebBrowser Control New Window

Well I have a Pop up in the WebBroswer control of the .NET Framework that I capture with the NewWindow event handler like so. WebBrowser w = new WebBrowser(); SHDocVw.WebBrowser_V1 web = (SHDocVw.WebBrowser_V1)w.ActiveXInstance; web.NewWindow += new SHDocVw.DWebBrowserEvents_NewWindowEventHandler(web_NewWindow); The new Popup is in a new form with a new instance of the WebBrowser control. void web_NewWindow(string URL, int Flags, string TargetFrameName, ref object PostData, string Headers, ref bool Processed) { Processed = true; WebBrowser w2 = new WebBrowser(); Form PopUp = new Form(); PopUp.Controls.Clear(); PopUp.Controls.Add(w2); w2.Dock = DockStyle.Fill; PopUp.Show(); w2.Navigate(URL); w2.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(w2_DocumentCompleted); } My problem is that the Window.Opener object is null in the process. The page uses that field to return the user back to the original window and fills some values on the form. Is there anyway to pass the Window.Opener object from one WebBrowser control to the next? Seems impossible that this will work but I have to try. Thanks

以上就是Javascript Window.Opener Object Null on .NET WebBrowser Control New Window的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏