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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top