Inserting values into Listbox

Results 1 to 3 of 3

Thread: Inserting values into Listbox

  1. #1
    Dat Guest

    Default Inserting values into Listbox

    &nbsp;<BR>Hi All,<BR><BR>I have a html listbox, LstBox1. I would like to insert values<BR>into LstBox1 from a Recordset1. I&#039m having trouble doing this<BR>in Javascript. Do I have to create an Option tag first, loop through the Recordset1 and insert the values from the Recordset1 into the Option tag? Then insert the Option tag into the LstBox1.<BR>Please help.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Inserting values into Listbox

    The following code will do the trick.<BR><BR>Hope this helps,<BR>todd.<BR><BR>sSQL = "SELECT * FROM TABLE_NAME"<BR>trs.Open sSQL,cn<BR>do until trs.eof tmp=trs("FIELD_NAME")<BR>%&#062;&#060;option value="&#060;%=tmp%&#062;"&#062;&#060;%Response.Wr ite(tmp)<BR>trs.movenext<BR>loop<BR>trs.close

  3. #3
    Dat Guest

    Default RE: Inserting values into Listbox

    Thanks Todd, <BR>I&#039ll try it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts