This topic is locked
[SOLVED]

 How to identify current selection in list

5/30/2007 5:53:39 PM
ASPRunnerPro General questions
R
ryn004 author

How do I retrieve what the current selection is from a dropdown list?
Reason is I want to creat a link besides the dropdown list called edit, which will redirect the user to a new window -? eg: tblSeller_edit.asp?id=3
Also is there a way to make a link open into a new window instead of always coding it manually?
Thanks

Sergey Kornilov admin 5/31/2007

You can use selectedIndex property on dropdown box.
Here are some examples (Javascript):
var dropdownIndex = document.getElementById('value_FieldName').selectedIndex;

var dropdownValue = document.getElementById('value_FieldName')[dropdownIndex].value;
Make sure you put correct control name there