Padre_Corleone
asked on
Get Value OnChange
I have a dropdown that i set a dynamic id, onChange i want to get the value of the dropdown dynamic id.
I want to dynamically add the on change attribute to something like:
mydropdownlist.attributes. add("OnCha nge",'GetM yValuefort heDynamicI D')
I want to dynamically add the on change attribute to something like:
mydropdownlist.attributes.
Dynamic id for dropdown: id can be any number given to it
<asp:dropdownlist runat="server" id="12345">
<listitem>a</listitem>
<listitem>b</listitem>
<listitem>c</listitem>
</asp:dropdownlist>
this.id in the function will dropdown list id
ASKER
i have the Id but need the value when user changes dropdown though
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know asp but why don't you output the onChange event as an attribute of the select from the server where you generate the html for the select?
ASKER
thanks jainnaveen that did it.
Graceful one: i am trying to avoid using server side to improve performance. thanks.
Graceful one: i am trying to avoid using server side to improve performance. thanks.