TForm1 = class(TForm) |
|
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: TEdit;
HtmlPscl1: THtmlPscl; // THtmlPscl component!
Label1: TLabel;
Label2: TLabel;
Memo1: TMemo;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject); |
end; |
|
var |
|
Form1: TForm1;
implementation |
{$R *.frm}
{ TForm1 } |
|
|
procedure TForm1.Button1Click(Sender: TObject);
begin |
|
HtmlPscl1.LoadFromFile( UnicodeString(Edit1.Text) );
HtmlPscl1.ScriptExec; |
To use a HTML file with
"<script type="text/pascalscript"
src="html\pascalrt.pscl"></script>"
code in HTML header.This code load "html\pascalrt.pscl" Script file
|
end; |
|
|
procedure TForm1.Button2Click(Sender: TObject);
begin |
|
HtmlPscl1.LoadFromFile(
UnicodeString(Edit1.Text) );
HtmlPscl1.LoadScript( Edit2.Text );
HtmlPscl1.ScriptExec; |
To use a "HTML" file with a Script file
Load a "HTML" file from "Edit1" and load
Script file from "Edit2". |
end; |
|
|
procedure TForm1.FormCreate(Sender: TObject);
begin |
|
HtmlPscl1.memoConsole := Memo1; |
Console to view message from THtmlPscl |
end; |
end. |
|