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

H

Hiten

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
 
V

Vidar Petursson

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/d...hor/dhtml/reference/dhtml_reference_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
==============================
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top