Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Radio button List problem: How to find value of Radio button list's Selected Item using javascript??

Reply
Thread Tools

Radio button List problem: How to find value of Radio button list's Selected Item using javascript??

 
 
Hiten
Guest
Posts: n/a
 
      05-03-2004
Hi

I am using Radio button list control on a web page and I want to display value of selected radiobutton list item in to a textbox control without using postback event. I want to use javascript instead

Anybody has idea of how to achieve this?? Sample would be appreciated..

Thank
Hite

 
Reply With Quote
 
 
 
 
Vidar Petursson
Guest
Posts: n/a
 
      05-26-2004
Hi,

As far as I know you can't set the onclick serverside
so perhaps something like this will do the trick...( IE )
<script>
function checkIt(){
if(event.srcElement.type == "radio") event.srcElement.form.TEXTBOXNAME.value
= event.srcElement.value;
}
</script>
<body onclick="checkit()">

More info
http://msdn.microsoft.com/library/de...ence_entry.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Visual: Scripting MVP 2000-2004
http://www.icysoft.com/
http://www.deus-x.com/ Instant e-commerce
http://www.microsoft.com/technet/scriptcenter/
Playground: http://213.190.104.211/ ( IE 5.5+ only )

No matter where you go there you are
==============================
"Hiten" <> wrote in message
news:F6838CC8-2ED8-40B8-AED9-...
> Hi,
>
>
> I am using Radio button list control on a web page and I want to display
> value of selected radiobutton list item in to a textbox control without
> using postback event. I want to use javascript instead.
>
> Anybody has idea of how to achieve this?? Sample would be appreciated...
>
> Thanks
> Hiten
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
need help to fill textboxes from a selected item in datagrid-selected index changed. mldardy ASP .Net 0 09-28-2010 02:59 PM
DropDownList 2 always returns Selected = 0 for all items - even selected item Iain ASP .Net 3 12-11-2006 11:07 AM
Get Value of Selected Item From Drop Down List Stephen Adam ASP .Net 3 11-30-2004 06:35 PM
Change style of a single row of the item list of datagrid, based on a field value of current item... QUASAR ASP .Net Datagrid Control 6 01-17-2004 07:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57