/**********************************************************
function buildSelectBox(formField,list)
UDF to build a select dropdown box from a list
@formfield: the name of the form field to populate
@list: the name of the list to use
@author: joel Richards
@email: joel@brainstormin.net
***********************************************************/
function buildSelectBox(formField,list) {
var optionLen = listLen(list);
var field = "";
field = "<select name='" & formfield & "'>";
for ( i=1; i lte optionLen; i = i + 1 ) {
field = field & "<option value='" & listGetAt(list,i) & "'>" & listGetAt(list,i) & "</option>" & chr(10);
}
field = field & "</select>";
return field;
} |