Question

I'm using Delphi XE2 in Windows 7 64 bit, I put TWebBrowser component in a Form. I navigate it to a blogspot website, e.g:

Webbrowser1.Navigate('http://maniacpcgame.blogspot.com');

it shows JavaScript Error (HTML Parsing Error), then I turn Silent properties to True as follow:

Webbrowser1.Silent := true;
Webbrowser1.Navigate('http://maniacpcgame.blogspot.com');

But the browser cannot open the page properly (only show background image). I tried other blogspot websites and got same problem. Any solution to display blogspot website correctly in TWebBrowser?

Was it helpful?

Solution

Twebbrowser uses IEFRAME

IEFRAME depends on the version of internet explorer you are running on that computer You can deploy IEFRAME.DLL (in c:windows/system32 )with your application so you can be sure the same version is used everywhere so you wont get inconsistencies between computers.

However newer ones wont work on XP and there are some directx requirements.

A good alternative is Delphi Embed chromium, it makes your deployed application a lot bigger (+-15MB) but you can be very sure it works everywhere and always (windows 8 to XP) and it will always produce the same page Also if you have to manipulate the DOM or insert javascript (to communicate with the page) this will be easier and will work more consistently.

Here is a link for the latest version: https://code.google.com/p/dcef3/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top