Web browser control prompts script error, does not display content

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
winsoft
Posts: 24
Last visit: Sat May 29, 2021 4:59 am

Web browser control prompts script error, does not display content

Post by winsoft »

Hello everyone, I have encountered two problems when using the web browser control. Any suggestions are welcome, thanks in advance

My system version: windows 7 sp1

IE browser version: 11.0

1. I have set: prohibit display of script errors, but when opening some pages, still prompt script error

2. In the web browser control, the displayed content is very different from the content displayed by the real IE browser. For example, some content is not displayed, and the flash content cannot be displayed.

I recorded an animated GIF demo, please see the image below, In addition
Last edited by winsoft on Wed Jun 05, 2019 8:30 pm, edited 1 time in total.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Web browser control prompts script error, does not display content

Post by jvierra »

Sorry but we do not read Chinese.

Web site errors cannot be suppressed in a web browser control. We can only address script errors.
winsoft
Posts: 24
Last visit: Sat May 29, 2021 4:59 am

Re: Web browser control prompts script error, does not display content

Post by winsoft »

Not just Chinese pages, many pages can't load properly

Now I have solved this problem with an external control.

Anyway, thank you very much for your reply.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Web browser control prompts script error, does not display content

Post by davidc »

FYI, we released a code snippet (shortcut: setWebBrowserEmulation) that sets the emulation mode of the WebBrowser control (host dependent / running executable). This can help with compatibility in some cases.

https://www.sapien.com/blog/2019/03/06/ ... -v5-6-160/
David
SAPIEN Technologies, Inc.
winsoft
Posts: 24
Last visit: Sat May 29, 2021 4:59 am

Re: Web browser control prompts script error, does not display content

Post by winsoft »

@David
Hello, I just saw the reply message, thank you for your reminder.

Content can be loaded, but the navigation buttons below the page are not available

Can you help me verify and solve this problem? thank you very much

test link:
http://fs.focusky.com.cn/zsaxp/lxvh/index.html?html5
Attachments
err.png
err.png (308.64 KiB) Viewed 3518 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Web browser control prompts script error, does not display content

Post by davidc »

The WebBrowser control doesn't always work well with advanced web features. If the snippet doesn't work for you, then I recommend either opening the page with an external browser or possible looking for a third-party control.
David
SAPIEN Technologies, Inc.
This topic is 4 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked