A5_HTML_LIST_POPULATE Function
Syntax
Arguments
- HTML_Option_Code
Formatted HTML code ready to be inserted into a HTML list box control.
- list
A CR-LF delimited list of choices of the form " Bound_Value | Display_Value " or " Display_Value " to appear in the HTML list box control.
- selectedItems
Optional. Default = NULL. The selected (default) value for the HTML list box control.
- tab_prefixes
Optional. Default = 0. The number of tabs to place before each line of OPTION code.
- format
Optional. Default = "Stored|Displayed". Any other value is equivalent to "Displayed|Stored". Indicates the order of values in List.
- html_encode
Optional. Default = .T. .T. = Uses *HTML_ESCAPE()to encode the values. .F. = Does not HTML encode the values.
- options
*
- separator
Character
Description
Creates the <option> ....</option> syntax from a crlf delimited list for use in an HTML list or combo box
Discussion
The A5_HTML_LIST_POPULATE() function generates value code for insertion into an HTML list box control.
Example
dim str as C
str = <<%a%
a
b
c
d
e
%a%
? a5_html_list_populate(str,"c",2)
=a
b
c
d
e
list = "a,b,c,d,e,f"
list = stritran(list,",",crlf() )
?a5_html_list_populate(list,"b",4)
=a
b
c
d
e
f
list = <<%a%
#r|red
#g|green
#b|blue
#c|cyan
#%a%
? a5_html_list_populate(list, "r")
= red
green
blue
cyanSee Also