Michael McGrew wrote:
I have a Dynamic drop-down box that is populated based on a ADO query.
This works fine. I want to capture the users selection and assign it
to a variable for use in another query. I am using the onChange event
to try and capture the users selection but it always passes the last
entry in the drop-down list not what the user selects. Can anyone
help me with this. I am very new to ASP\Jscript\Vbs cript. A snippent
of the code is below.
<select name="cur_mgr"
onchange="setMg r(this.options[this.selectedIn dex].value);">
<option value=""></option>
<%=Manager%>
</select>
This is not really an ASP issue (you'd be having the same problem if
your file had a .htm extension instead of .asp, wouldn't you?): it's a
client-side scripting issue. You haven't shown us enough here to allow
us to reproduce your problem. When you post to the client-side scripting
group (microsoft.publ ic.scripting.js cript) include the setMgr function
code. Also, run your page and View source so you can include the html
for the options in the select element.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.