asp:radiobutton

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone tell me if there is a way to change the text of an
asp:radiobutton from within javascript so that I don't have to postback to
the server.
 
no supported way, but its easy (air code).

function setLabel(radioid,value)
{
var labels = document.getElementsByTagName('LABEL');
for (var i=0; i < labels.length; ++i)
{
if (labels.htmlFor == radioid)
{
labels.innerText = value;
return;
}
}
}

-- bruce (sqlwork.com)
 
Bruce,

You are assume. Thanks so much, I've been battling this all day. I
wouldn't have thought this would be such a problem. I'm more of a server
side guy, but obviously I need to brush up on my client side scripting.

Thanks again

bruce barker said:
no supported way, but its easy (air code).

function setLabel(radioid,value)
{
var labels = document.getElementsByTagName('LABEL');
for (var i=0; i < labels.length; ++i)
{
if (labels.htmlFor == radioid)
{
labels.innerText = value;
return;
}
}
}

-- bruce (sqlwork.com)
Can someone tell me if there is a way to change the text of an
asp:radiobutton from within javascript so that I don't have to postback to
the server.
 
Back
Top