Getting a asp:radiobutton text in javascript?
- by bala3569
How to get a asp:radiobutton text in javascript?
I use this
RbDriver1.Text = dt.Rows[0].ItemArray[5].ToString();
RbDriver2.Text = dt.Rows[0].ItemArray[6].ToString() ;
and my javascript function is
function getDriverwireless() {
alert(document.getElementById("ctl00_ContentPlaceHolder1_RbDriver1"));
alert(document.getElementById("ctl00_ContentPlaceHolder1_RbDriver1").innerHTML);
}
innerHTML doesnt seems to take the text of my radiobutton...any suggestion
When i inspect throgh firebug i found this
<input type="radio" onclick="getDriverwireless();" value="RbDriver1"
name="ctl00$ContentPlaceHolder1$drivername"
id="ctl00_ContentPlaceHolder1_RbDriver1">
<label for="ctl00_ContentPlaceHolder1_RbDriver1">kamal,9566454564</label>
I want to get the value kamal,9566454564 in javascript...