O4WDownload routine
Description
Generates a file download.
Syntax
O4WDownload(filename, contentType, content, suggestedFilename, newWindowName, keepFile)
Parameters
The function has the following parameters:
Parameter | Description | |
---|---|---|
filename | Can be an operating system file, or an OpenInsight file (in the form <table>" "<itemID>). | |
contentType | If <contentType> is not specified, it is determined from <suggestedFilename>/<filename>, if possible. | |
content | The contents of the file to download. | |
suggestedFilename | The name to display as the "Save as…" on the download. If not specified then the filename parameter's value is used. If suggestedFileName parameter is null, then the downloaded item will attempt to be opened in the current browser page, and not as an attachment. | |
newWindowName | If specified, and this is generated during an O4W "response", then a new browser window will be opened for the response. | |
keepFile | If <keepFile> is set to "1", the file (if any) is not removed after this call (by default, O4WDownload will remove the file after downloading). O4W toolkit applications should return after the O4WDownload call, as no other content can be returned. |