SetFileOptions Method (BUTTON)
PLBCMP GUI Only, 9.7A
The SetFileOptions method sets the specific options used by the client browser File Upload selection dialog which can be invoked using a BUTTON object with the BUTTONTYPE=$FILEINPUT type. This method only takes affect when executing using the PL/B Web Server. This method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A Button that is accessed.
return
Optional. A Numeric Variable whose value is always set to a zero.
filter
Optional. A Character String Variable or literal that contains a filter string that is applied by a client browser File Upload selection dialog to restrict the end-user file selections.
flags
Optional. A Numeric Variable or decimal number whose value provides bit mask values that are used control behaviors that are applied to the client browser File Upload selection dialog.
Flags Affected: EOS, OVER, ZERO
Note the following:
The EOS and OVER flags are always cleared.
The ZERO is always set.
If the {flags} bit mask value is zero, the {return} Character String variable is returned as a NULL variable. Otherwise, the {flags} bit mask values are described as follows:
|
Flag Values |
Selects ... |
|
0x0 |
only one file. |
|
0x1 |
multiple files. |
The optional {filter} string can be specified to restrict the selection criteria to be applied by the client browser File Upload selection dialog. The {filter} string can be specified as a comma delimited list of MIME types as described for the 'accept' attribute of a HTML <input type="file"> tag. See the following browser link for more details on acceptable MIME types that can be used:
http://www.w3schools.com/tags/att_input_accept.asp
Example of {filter} MIME Types:
See Also: Button Methods, Method Syntax
![]() |