guides:o4w:o4w_api:o4wuploadbox

O4WUploadBox routine

Creates a "file upload" textbox. The uploaded file will be placed at the specified destination.

O4WUploadBox(default, destination, length, name, id, style)

The function has the following parameters:

ParameterDescription
defaultThe default value to be placed into the textbox.
destinationThe uploaded file will be placed into the destination.

If the destination is in the form: <tablename><space><record> then the file will be into OpenInsight in the specified table.
If the destination is empty, the contents of the file will be available through O4WGetValue.
If the destination is not null, it can contain the "^" character (which will be replaced by the original file name), the "#" character (which will be replaced with the current internal data and time), and the "$" character (which will be replaced by the original file extension).
If the destination is in the form @<routinename>, then the specified routine will be called to generate the destination information.
If the destination parameter value starts with "@", the rest of the value is the name of a stored procedure to call to programmatically generate the destination name. The interface to the called routine will be: call @progName(origValue, destn, size, name, id, styleInfo), where the parameters passed to this routine are the same as those passed to O4WUPLOADBOX itself.
lengthThe size of the upload text box.
nameIdentifies the upload when the form is returned from the browser.
idThe unique id of the uploadbox. If specified, the control can be addressed through style sheets individually.
styleIf specified, the style is applied to the text that is generated.

Note that <style> may be either the name of a style (as created by one of the O4W style functions, or as defined in an included style sheet), or it can be the returned value from one of the O4W style functions.

Additional file information may be retrieved by getting the values for <ID>.length (the file length), <ID>.contenttype, and <ID>.filename (the original uploaded file name and extension). If no file is uploaded, <default> will be returned as the value of the control.

  • guides/o4w/o4w_api/o4wuploadbox.txt
  • Last modified: 2024/06/19 20:19
  • by 127.0.0.1