The link "HREF="+ScriptName+"/unknown/link/for/us" creates an access where the URL path is "/unknown/link/for/us". As the ISADispModul contains no ActionItems with "unknown" PathInfo, the request will be processed in the ISAPIDispatcher1 OnUnExpectedRequest event. In the OnUnExpectedRequest event we dynamically create a TfmUnexpected type form and activate the PreparePP (Request,Response) method of the FReport1 component on the form. We use the ServerVariable property of the Request to get the client address "REMOTE_ADDR", create the log text, and write it into the log file using the ISAPIApp.WriteLog method. Form TfmUnexpected has the FReport1 that controls the generation of the whole visually designed HTML, and the MainStyle component that is used to specify the background and text colour and the font name and size.
Link "HREF="+ScriptName+"/askname" creates an access where the first part of the URL path is "askname" proceeding from which the ISAPIDispatcher1 chooses ActionItem aiAskName with PathInfo "askname" to reply to the request. In the OnAction event of this ActionItem we dynamically create a TfmAskName type form and we activate the PreparePP (Request,Response) method of the FReport1 component which is on the form. Besides the Freport1 component the form TfmAskName contains the FRForm1 component that adds the FORM element to the HTML. The FRForm1 Action is "tellname", and therefore the form creates an access where the first part of the URL path is "tellname", and as a result the ISAPIDsipatcher1 chooses ActionItem aiTellName with PathInfo "tellname" to respond to the request. In the OnAction event of this ActionItem we dynamically create a TfmTellName type form and activate the PreparePP (Request,Response) method of the FReport1 that is on the form. On form TfmAskName there is TFREdit1 with HName property "NAME", therefore the parameter NAME is available in the next request. The ButtonType of the "OK" button is frbtSubmit, as a result the INPUT TYPE=SUBMIT element is included in the HTML FORM element and by clicking on it the data entered into the form will be sent to the server.
Form TfmTellName contains a static label "Thank you", and a dynamic label lbName in the OnGetText event of which we read the request parameter "NAME" and use it for a dynamic generation of the text.