Getting a asp:radiobutton text in javascript?
Posted
by bala3569
on Stack Overflow
See other posts from Stack Overflow
or by bala3569
Published on 2010-05-29T05:01:58Z
Indexed on
2010/05/29
5:12 UTC
Read the original article
Hit count: 314
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...
© Stack Overflow or respective owner