PC Review


Reply
Thread Tools Rate Thread

asp:radiobutton

 
 
=?Utf-8?B?ZGdhdG9y?=
Guest
Posts: n/a
 
      3rd Oct 2007
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.
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      3rd Oct 2007
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[i].htmlFor == radioid)
{
labels[i].innerText = value;
return;
}
}
}

-- bruce (sqlwork.com)

dgator wrote:
> 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.

 
Reply With Quote
 
=?Utf-8?B?ZGdhdG9y?=
Guest
Posts: n/a
 
      3rd Oct 2007
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" wrote:

> 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[i].htmlFor == radioid)
> {
> labels[i].innerText = value;
> return;
> }
> }
> }
>
> -- bruce (sqlwork.com)
>
> dgator wrote:
> > 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.

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
groupbox and radiobutton relationship - which radiobutton is check =?Utf-8?B?UmljaA==?= Microsoft VB .NET 2 30th Jan 2007 04:56 PM
RadioButton Radiobutton via DotNetMonster.com Microsoft C# .NET 6 13th May 2006 01:37 AM
asp.net radiobutton doesnt recognize jscript function, but html radiobutton will moondaddy Microsoft ASP .NET 10 30th Mar 2004 04:02 PM
radiobutton Randy Microsoft VC .NET 0 8th Mar 2004 09:40 AM
The RadioButton peter hansen Microsoft VB .NET 8 14th Dec 2003 01:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:40 PM.