WebBrowser control and javascript popup code: "if(popupWnd != null) popupWnd.close()"

J

Jeff

My app is hosting a WebBrowser control that handles popup window
opening via the NewWindow3 event, and popup window closing via the
WM_PARENTNOTIFY/WM_DESTROY combo. It works fine for the most part.

On a particular web site that has it's own "Back" navigation button, I
get a javascript error when the script tries to access a previously
creating popup window using some javascript like this:

if(popupWnd != null) popupWnd.close()

That script works fine in IE, but not in my hosted WebBrowser.

Any ideas?

Thanks,
Jeff
 
C

Calvin Kwok

because popupWnd.close() will call your close() method,which written by yourself. This may cause cross-site access. IE will ban it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top