Hi, i have a dropdown list.
Once i selected a value, it will automatically pop up a new window, displaying the values. The values will get from the db using the selected dropdown list value..
However, i cant get the value for my dropdown list..
How shld i get it?
Javascript code to pop up new window
Code:
function open_win() {
window.open("openEditLink.asp")
}
Code to display the dropdown list and get the value
Code:
<tr><td>Vulnerability Link: </td>
<td><select name=vulLink id=select onchange ="open_win()">
<option value="none">--Select Link--
<%While (NOT rs_vulLink.EOF)%>
<option value="<%=(rs_vulLink.Fields.Item("vul_no").Value)%>"<%If (Not isNull((Session("vulLink")))) Then If (CStr(rs_vulLink.Fields.Item("vul_no").Value) = CStr((Session("vulLink")))) Then Response.Write("SELECTED")%>><%=(rs_vulLink.Fields.Item("vul_no").Value)%></option>
<%
rs_vulLink.MoveNext()
Wend
If (rs_vulLink.CursorType > 0) Then
rs_vulLink.MoveFirst
Else
rs_vulLink.Requery
End If
%>
</select></td></tr>
Codes to display the values (pop up window)
Code:
Dim rs_viewRec
Set rs_viewRec = Server.CreateObject("ADODB.Recordset")
rs_viewRec.ActiveConnection = MM_dsprms_STRING
rs_viewRec.Source = "SELECT * FROM Security_Vulnerability WHERE Vul_No= '" & request.form("vulLink") & "'"
rs_viewRec.CursorType = 0
rs_viewRec.CursorLocation = 2
rs_viewRec.LockType = 1
rs_viewRec.Open()
response.write rs_viewRec.source
Thanx