# Type TFileRequestEvent

## Declaration

TFileRequestEvent = procedure(Sender: TObject; const SRC: string;

var NewName: string) of Object;

## Description

The TFileRequestEvent type is the type for the OnFileRequest event. This event allows a handler to respond with an HTML document in file form when a request is made for a new document. The parameters are:

SRCA string identifying the document requested. This string will usually be taken from a SRC= attribute.

NewFileThe name of the file containing the HTML text supplied by the event handler.

The following points are important in writing the event handler:

If an empty string is returned for the NewFile parameter, TFrameViewer will default to loading the file identified by SRC.

In general, you must respond with a valid NewFile. If an empty string is returned for the NewFile parameter, TFrameViewer will attempt to load the file identified by SRC. However, this is unreliable unless SRC contains a filename with the full path.

Only one of the event handlers in the group, OnBufferRequest, OnFileRequest, OnStreamRequest, and OnStringsRequest, may be active at the same time.

See also:

OnBufferRequest Event

OnStreamRequest Event

OnStringsRequest Event