The two important things about TWebAction are:
Can you pass parameters? Yes!
%=webaction1.execute|aparameter,anotherParameter,etcParameter=%
If you open the webhub.hlp file and go to the CONTENTS page, you will find links with information on setting up your first project and getting HTML like this going. It's a bit different from crafting regular static HTML pages.
Public procedure Send(Const Text:String); Applies to TWebBasicOutput Description: Sends string to the output document which is sent to the surfer.Send() is the easiest way to send dynamic HTML to the web. EVERYTHING ELSE IS TAKEN CARE OF FOR YOU BY WEBHUB.
NO KIDDING.
procedure TForm1.WebAction1Execute(Sender: TObject);
begin
with TWebAction(Sender) do begin
with WebOutput do begin
Send('Hello'); // hello there
Send('<h2>Hello</h2>'); // same thing, in a header
SendComment('Hello?'); // sends an HTML comment
Send('%=pageHeader=%'); // sends the contents of a WebHub "chunk" named pageHeader
end;
end;
end;
As you can see, the ability to send strings to a web page is pretty
basic and pretty powerful. Especially when you have the entire WebHub
framework supporting you.
You won't have to learn about DLLs or ISAPI or NSAPI or cgi details. All you have to do is use Delphi and WebHub.
After you've done a few pages like this, you can branch out to use the other TWebAction components for assistance with database grids and a whole lot more. But for starters, this is all you need to know.
Copyright (c) 1995-1997 HREF Tools Corp. All Rights Reserved.