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

Discussion in 'ASP .Net Web Controls' started by Hiten, May 3, 2004.

  1. Hiten

    Hiten Guest

    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
     
    Hiten, May 3, 2004
    #1
    1. Advertisements

  2. 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
    ==============================
    "Hiten" <> wrote in message
    news:...
    > 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
    >
     
    Vidar Petursson, May 26, 2004
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Criswell
    Replies:
    1
    Views:
    1,571
    John Criswell
    Jul 24, 2003
  2. Stephen Adam
    Replies:
    3
    Views:
    12,402
    Stephen Adam
    Nov 30, 2004
  3. =?Utf-8?B?U3VyZXNo?=

    radio button List item in Datagrid

    =?Utf-8?B?U3VyZXNo?=, Feb 4, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    553
    =?Utf-8?B?U3VyZXNo?=
    Feb 4, 2005
  4. Iain
    Replies:
    3
    Views:
    1,176
  5. mldardy
    Replies:
    0
    Views:
    1,159
    mldardy
    Sep 28, 2010
  6. QUASAR
    Replies:
    6
    Views:
    638
    QUASAR
    Jan 17, 2004
  7. pardesiya
    Replies:
    7
    Views:
    563
    pardesiya
    May 22, 2007
  8. Replies:
    5
    Views:
    398
    Peroli
    Apr 22, 2008
Loading...