Combo box

Results 1 to 2 of 2

Thread: Combo box

  1. #1
    Nath Guest

    Default Combo box

    I am loading a combobox using ASP code and when the page is viewed in the browser, the combo box has the first item in it even. Initially I would like to show a blank item in the combo box till the user pulls down on the combo box and selects some value from the combo box, could someone tell me how can I be able to do this?<BR><BR>Thank You<BR>Nath

  2. #2
    Trung Dang Guest

    Default RE: Combo box

    Prior to looping to construct all of your elements as &#060;option...&#062;, create a blank &#060;option&#062; tag with "selected" attribute. This will let HTML render your drop down box with a blank item as the default item.<BR>For example:<BR>&#060;select name="ddlist&#062;<BR>&#060;option value="" selected&#062;<BR>&#060;% Do Until myRS.EOF<BR>Response.Write "&#060;option value=""" & myRS(FieldName) & """&#062;" & myRS(FieldName)<BR>myRS.MoveNext<BR>Loop<BR>%&#062 ;<BR>.<BR>.<BR>.<BR>

Posting Permissions

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