T
T
TechNOIR2018-02-19 16:01:49
C++ / C#
TechNOIR, 2018-02-19 16:01:49

C#. webbrowser. Javascript is not working correctly. How to fix it?

Good afternoon. The program has a WebBrowser component. Pagination does not work through it at https://avotron.ru/catalog/to/bmw/ . More precisely, the first row opens, and the second and subsequent ones do not work ..
Any ideas, comrade connoisseurs? Thanks in advance
ScriptErrorsSuppressed is enabled for WebBrowser.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#, 2018-02-19
@TechNOIR

Well .. since WebBrowser and not WebView (like WPF and UWP) then WinForms .. by the way, you should immediately clarify such nuances;)
the fact is that in forms, and in WPF - this is the old, "good", "donkey" (IE, I don't even know when and why it was called "donkey", but for some years, it was quite common).. (and for God's sake - if you have wine 10 - do not confuse with Edge !!! only in UWP WebView control uses the Edge engine, and everything below is NOT about it)
.. well, since this is IE... then:
1 - first check the site in IE of the same system where you are developing and debugging the program. if suddenly in "just" IE, the site works quite adequately for itself.. see point 2 .. if not.. check in Chrome, and read p3.. or swear with the creators of the site and / or with MS..
2 - "embedded" IE has a feature (it was until recent years for sure) - "lower" itself by a couple of versions. it may seem wild, but it was a tactical move to ensure the compatibility of a huge amount of corporate
software . .. in desktop IE and in the control of your program - and compare the versions .. and if they differ , read on ..
- google about the registry branch HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION - what and how to write to it ... an annoying inconvenience, is that every executable that uses IE, but wants the latest features - you need to register there
- .. what's even more annoying, if you plan to distribute your creation (program), then it will need to be taught self-registration (learn how to work with the registry)
3 - as a workaround - you can immediately start mastering CEF # (but from my own experience I will say - it's easier for a beginner to master what is described above.. in p2.. ; )
) ) versions... davescoolblog.blogspot.ru/2011/04/ie9-document-mod... www.thevista.ru/page11442-rezhim_sovmestimosti_i_i... pps 2+++ the donkey has already tired me for several years) .. but see the screen - https://i.imgur.com/nWtlpPC.png
... in any case, you can dig in this direction
ppps
besides CEF# there is also GeckoFX , it was easier for me personally to "enter" it ;)) ... well, there are other nuances ... in particular, there are projects that require support original js ... ... these are rarely requested situations, but I encountered)) ... fox turned out to be out of competition ... nevertheless - geckofx is refreshed much less often than CEF # ... the choice depends on the goals ... and opportunities ))
well, UWP with Edge .. even a good choice for Windows ;))) ... full support in MSDN ... again, a short way to the "MS store" window ... and not any "corporate "engine versioning issues... ;)))
pppps
bad news... your link is from the text of the question- in the "donkey" 10ki (classic IE) without any versioning restrictions - it does not work adequately .. so either bugs with the site developers / MS .. or changing the tool ... WinForms / WPF with default control - will not help you ..
in Edge, Chrome, Firefox - all in a bunch ... that is, either UWP (with built-in Edge, and a freebie car) or GeckoFx or CEF #
this verdict is final

G
Griboks, 2018-02-19
@Griboks

Maybe it's worth posting the text of the error? Well, there is only one way out - do not use the built-in browser !!!!!!! There are many different browser frameworks, such as CEFSharp.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question