THtmlViewer - how to load a webpage?
lazarus / 38-Networking and Web Programming
----------------------------------------------------------------------
domasz · 2022-08-15 11:52
Hi!
This works nicely:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
HtmlViewer1.LoadFromFile('test.htm');But this doesn't:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i
HTmlViewer1.URL:='http://myserver.com/test.htm';
Do I need to do something special to load from http? Is there an event
where I am supposed to download the page myself and feed THtmlViewer?
----------------------------------------------------------------------
dje · 2022-08-15 12:11
The example Browser.lpr supports http access via TIpHttpDataProvider
(unit Iphttpbroker).
https://wiki.freepascal.org/TIpHttpDataProvider
QuoteThe TIpHttpDataProvider handles requests for images and other
files by retrieving them from the internet.
It appears to be a simple plug-n-play solution,
https://github.com/alrieckert/lazarus/blob/master/components/turbopowe
r_ipro/examples/browserfrm.pas
----------------------------------------------------------------------
domasz · 2022-08-15 12:13
Thank you!
----------------------------------------------------------------------
wp · 2022-08-15 12:28
THtmlViewer <> TurboPower TIpHtmlPanel!
Verify which component (package) you are using.
----------------------------------------------------------------------
domasz · 2022-08-15 17:25
I use THtmlViewer
----------------------------------------------------------------------
wp · 2022-08-15 17:48
The HtmlViewer package contains a folder with lots of documentation
(HtmlHelp). It says about TFrameBrowser.URL:
"Read only and run time only. The URL property returns the most
recently selected (left mouse click) URL."
----------------------------------------------------------------------
domasz · 2022-08-15 17:54
Quote from: wp on August 15, 2022, 07:48:31 pmThe HtmlViewer package
contains a folder with lots of documentation (HtmlHelp).
Thanks! I was looking for help in the F1 manual and in lazarus dir but
thanks to you I found the dir with help:
C:\Users\{USER_NAME}\AppData\Local\lazarus\onlinepackagemanager\packag
es\HtmlViewer\HtmlHelp