Welcome Guest Search | Active Topics | Sign In | Register

Communication between webviews Options
ludovic.surcin
Posted: Thursday, May 17, 2018 11:58:58 AM
Rank: Newbie
Groups: Member

Joined: 2/19/2014
Posts: 3
Hello everyone,

I've been facing a problem for several days (weeks) with a site I'm trying to display in WPF using EO Web Browser.

I'll try to be as clear as I can.

After I log on to the site, my goal is to download a PDF present on the site (downloadable with a button). This button is supposed to open a second window, load code (which seems to be angularjs) on this page and close to then display a blob of the PDF file. I manage the second window with a tab system, which opens a second WebView after clicking the button. Unfortunately an error occurs in my debug console:

"Uncaught TypeError: Cannot read property 'document' of null (...).

The second WebView opens well, but the angular code of the site doesn't seem to be loaded and nothing happens except a blank page.

If you have any ideas to solve this problem, I'll take it.

Thank you in advance for your help,

Sincerely
eo_support
Posted: Thursday, May 17, 2018 2:09:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

We won't review your JavaScript code. However if you use window.open to open a second window, you need to handle NewWindow event property and make sure you use e.WebView, DO NOT create a new WebView for the new window. You can take a look of the source code in TabbedBrowser sample application for more details.

Thanks!
ludovic.surcin
Posted: Wednesday, May 23, 2018 4:21:10 AM
Rank: Newbie
Groups: Member

Joined: 2/19/2014
Posts: 3
Hi,

Quote:
you need to handle NewWindow event property and make sure you use e.WebView


That solved my problem, thank you very much!
eo_support
Posted: Wednesday, May 23, 2018 8:14:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Great. Glad to hear that it works for you!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.