30
rated 0 times
[
34]
[
4]
/ answers: 1 / hits: 16373
/ 11 Years ago, fri, june 7, 2013, 12:00:00
I have drop down list declared like :
<asp:DropDownList ID=myDropDown width=300 CssClass=textboxda
AutoPostBack=True runat=server onmousewheel=return false; />
Drop down list change method
myDropDown.Attributes.Add(OnChange, return OnChange(););
function OnChange()
{
var $j = jQuery.noConflict();
var sel = $j(this).prevAll(#myDropDown:first),
val = sel.val(),
text = sel.find(':selected').text();
alert(text);
}
I am populating this drop down dynamically.
I am fetching the last/previously selected text of the drop down, but this is not working.
Please suggest.
More From » jquery