clubreseau 0 Posted August 18, 2022 I use delphi 10.4 I create a button and inside I add WebBrowser1.Navigate('https://www.aliexpress.com/'); to make it simple and test it. and I got a many javascript error how i can fix this. thank you ror Share this post Link to post
FPiette 382 Posted August 18, 2022 WebBrowser is using Internet Explorer which has been retired by Microsoft. Try with TEdgeBrowser instead. Look at Delphi documentation https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_TEdgeBrowser_Component_and_Changes_to_the_TWebBrowser_Component Share this post Link to post
Lajos Juhász 293 Posted August 18, 2022 If you really want to use TWebBrowser you must set FEATURE_BROWSER_EMULATION before using the component (Windows is going to remove it from the registry constantly). Of course this is only a short term solution as IE is dead. Share this post Link to post
Der schöne Günther 316 Posted August 18, 2022 1 hour ago, Lajos Juhász said: Windows is going to remove it from the registry constantly To be honest, I have never heard of that, let alone experienced it myself. It is still working fine, at least for the parts where have not migrated to the (fantastic!) EdgeBrowser yet. Share this post Link to post
Lajos Juhász 293 Posted August 18, 2022 For me it's happening for about a year maybe a bit longer, before that I used the registry entry for years without a problem. Share this post Link to post
toms 29 Posted August 18, 2022 Add WebBrowser1.Silent := True; to suppress script errors. Share this post Link to post
Fabian1648 2 Posted June 12, 2023 (edited) To give a WebBrowser1.Silent := True; to suppress script errors is not a solution!!!!! I have the same problem with the Delphi 11.3 sample called "WebBrowser" running on Win11. It is impossible to load a website (even bing.com!!!) without these script errors. And "do not display these errors" does not prevent malfunctions of the website!!!! So I'm reactivating the question, does anyone know why the Webbrowser sample is unable to play javascripts and is there a solution? Since these are samples provided by Embarcadero itself, we shouldn't even have to ask this question 😞 --- If anyone wonders why you insist on using delphi to display a website, I'd like to point out that the latest versions of Chrome and Edge (and maybe others) have changed their popup management, making many sites unusable without any prior announcement that I'm aware of! Edited June 12, 2023 by Fabian1648 Share this post Link to post
Lajos Juhász 293 Posted June 12, 2023 https://stackoverflow.com/questions/25843845/how-to-have-delphi-twebbrowser-component-running-in-ie9-mode Share this post Link to post
David Schwartz 426 Posted June 12, 2023 On 8/17/2022 at 10:49 PM, Lajos Juhász said: Of course this is only a short term solution as IE is dead Wait ... what? Didn't Bill Gates testify before Congress that IE is an "integral part of the OS" and that "Windows would not work without it?" 1 Share this post Link to post
Fabian1648 2 Posted June 12, 2023 5 minutes ago, Lajos Juhász said: https://stackoverflow.com/questions/25843845/how-to-have-delphi-twebbrowser-component-running-in-ie9-mode This solution has a note "Asked 8 years, 9 months ago"... 8 years ago, what version of Windows was in use? Do we have the same ie sources in a Windows OS 8 years ago and in Win11? Share this post Link to post
Der schöne Günther 316 Posted June 12, 2023 (edited) 4 minutes ago, Fabian1648 said: Do we have the same ie sources in a Windows OS 8 years ago and in Win11? Yes, we do. Nothing has changed. You still have two options: Set IE emulation to something newer than 2006 Use an alternative from this decade (like the chromium-based WebView2 engine) Edited June 12, 2023 by Der schöne Günther Share this post Link to post