WEB LISTING 4: VBScript Function to Build an HTML List Box from Resultset <% ' '-- to build the HTML list box from recordset ' Function BuildActivityTreeListHTML( oRs ) Dim strListHTML '--- initial " '--- Determine whether zero nodes exist. '--- Add dummy node, set the end of tag. IF( oRs.EOF ) THEN strListHTML = strListHTML + "" strListHTML = strListHTML + " " BuildActivityTreeListHTML = strListHTML EXIT Function END IF '--- Loop to parse the recordset and add node to list item. WHILE( not oRs.EOF ) '--- Add item to list box by using " '--- Move to next record. oRs.MoveNext WEND '--- end of tag marker for " '--- Return the list box as an HTML string. BuildActivityTreeListHTML = strListHTML END Function %>