Showing posts with label dropdownlist. Show all posts
Showing posts with label dropdownlist. Show all posts

Thursday, November 26, 2009

how to get dropdownlist selected value and text in javascript

var IndexValue = $get('<%=ddlGraphperiod.ClientID %>').selectedIndex;
var SelectedText = $get('<%=ddlGraphperiod.ClientID %>').options[IndexValue].text;
var SelectedVal = $get('<%=ddlGraphperiod.ClientID %>').options[IndexValue].value;