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. Advertising

  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. Advertising

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. Stephen Adam
    Replies:
    3
    Views:
    12,094
    Stephen Adam
    Nov 30, 2004
  2. Iain
    Replies:
    3
    Views:
    919
  3. mldardy
    Replies:
    0
    Views:
    954
    mldardy
    Sep 28, 2010
  4. pardesiya
    Replies:
    7
    Views:
    296
    pardesiya
    May 22, 2007
  5. Replies:
    5
    Views:
    178
    Peroli
    Apr 22, 2008
Loading...

Share This Page