Skip to Content
0
Former Member
Sep 13, 2007 at 02:19 PM

drop down box selection

18 Views

How can I fix the value of a drop down box to the selected value. Say I enter the page and choose a value in the drop down box. Upon submitting (the page submits to itself), the drop down box should show the previous value selected. How can I do this? It gets values from a table. Thanks.

Code for my drop down box:


<htmlb:gridLayout id = "FiletypeGrid"
                                  cellSpacing    = "3"
                                  columnSize     = "4"
                                  rowSize        = "5" >

                        <htmlb:gridLayoutCell   rowIndex = "1"
                                                columnIndex = "1"
                                                horizontalAlignment = "right" >
                             <htmlb:textView text = "Please choose Target Year/Month: "
                                     design = "EMPHASIZED"/>
                       </htmlb:gridLayoutCell>

                       <htmlb:gridLayoutCell   rowIndex = "1"
                                                columnIndex = "2"
                                                horizontalAlignment = "right" >
                             <htmlb:dropdownListBox id ="calmonthyear"
               nameOfKeyColumn   = "calmonth"
          nameOfValueColumn = "calmonth"
          table             = "<%=ITABnew%>" >

</htmlb:dropdownListBox>

                  </htmlb:gridLayoutCell>