Hi i need help with listbox asp..
The form does updating.
So the selected listbox should display the original record from the database
AND the remaining other values that the user can choose to edit.
When the page loads, it simplys load all the available options.
However i cant seem to display the original record FIRST when the page loads.
I want to be able to show the original record when the page loads and then when the user clicks on the dropdown menu, the other
options are available.
i hope u guys understand what i mean
anyway this is what i have done..
it simply displays all the records in the listbox.
Pls help.. thanks alot..Code:<%=Request.Form("login")%> <tr> <td bgcolor="#000080" align=middle><font size='2' face='Tahoma' color='#ffffff'><b>Login Type</font></B></td> <td><SELECT name=login LANGUAGE=javascript onchange="return dept_onchange(thisForm)"> <% Set oRs=Server.CreateObject("adodb.recordset") strSQL = "SELECT DISTINCT LOGINTYPE FROM SUNDER.MOBILE_USERS_NEW " strSQL = strSQL & " ORDER BY LOGINTYPE" oRs.Open strSQL, conn Do while not oRs.EOF if Request.Form("login") = oRs("LOGINTYPE") then Response.Write "<OPTION VALUE = '" & oRS ("LOGINTYPE") & "' SELECTED>" Response.Write oRs("LOGINTYPE") & "</Option>" oRs.MoveNext else Response.Write "<OPTION VALUE = '" & oRs ("LOGINTYPE") & "'>" Response.Write oRs("LOGINTYPE") & "</Option>" oRs.MoveNext end if loop %></SELECT></td> </tr>


Reply With Quote
Bookmarks