UNKNOWN '************************************** ' Name: Populate a dropdown- select opti ' on box ' Description:Populate a drop-down, sele ' ct, option box control. Add your options ' via a sub or function. works in MS Internet Explorer and HTA's. Google Chrome does not support VBScript. ' By: A_X_O ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.9796/lngWId.4/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** <htm> <head> <title>Populate a drop-down ? select ? option ? box</title> </head> <body> <script LANGUAGE="VBScript"> Sub window_onload() ' on error resume next ' Dim x, DropListOptions Dim oOption ' For x = 0 To 7 Set oOption = document.createElement("OPTION") ' DropListOptions = Split("htm|meta|head|body|font|table|form|script", "|", -1, 1) ' With oOption .text = "Option:"&Space(2)&(x)&Space(2)&UCase(DropListOptions(x)) .value= (DropListOptions(x)) End With ' Document.All.select1.add(oOption) ' Next ' Set oOption = Nothing ' End Sub ' </script> <p> <select name="select1" size="1" style="font-family: Courier; font-size: 12; background-color: rgb(128,128,128); color: rgb(255,255,255)"> </select> </p> </body> </htm>