Disabling radio button client - side

Discussion in 'ASP .Net Web Controls' started by John Hopper, Feb 2, 2005.

  1. John Hopper

    John Hopper Guest

    Hello,

    I'm using client-side script to enable/disable a series of web controls. All
    except radio buttons can be enabled by
    document.getElementById.controlName.disabled = false.

    How do I enable the asp radio buttons in this script?

    Thank you
     
    John Hopper, Feb 2, 2005
    #1
    1. Advertising

  2. Hello,
    I used
    window.document.Form1.all("RadioButton1").disabled=true;
    to disable a radio button and used
    window.document.Form1.all("RadioButton1").disabled=false;
    to enable it again and it worked.

    Would you please try it this way and tell me if it works on your side too.

    Regards
    Mohamed El Ashmawy
    MEA Developer Support Center
    ITWorx on behalf of Microsoft EMEA GTSC
     
    Mohamed El Ashmawy, Feb 3, 2005
    #2
    1. Advertising

  3. John Hopper

    John Hopper Guest

    Well that's what I expected to use because I use that too with html radio
    buttons but it didn't seem to work with asp radio button controls. Thanks
    anyway. I ended up just disabling the table cell containing the radio buttons
    in the method you describe.

    John Hopper

    ""Mohamed El Ashmawy"" wrote:

    > Hello,
    > I used
    > window.document.Form1.all("RadioButton1").disabled=true;
    > to disable a radio button and used
    > window.document.Form1.all("RadioButton1").disabled=false;
    > to enable it again and it worked.
    >
    > Would you please try it this way and tell me if it works on your side too.
    >
    > Regards
    > Mohamed El Ashmawy
    > MEA Developer Support Center
    > ITWorx on behalf of Microsoft EMEA GTSC
    >
    >
     
    John Hopper, Feb 7, 2005
    #3
  4. John Hopper

    Guess Guest

    [This followup was posted to
    microsoft.public.dotnet.framework.aspnet.webcontrols and a copy was sent
    to the cited author.]

    In article <>,
    says...
    > Hello,
    >
    > I'm using client-side script to enable/disable a series of web controls. All
    > except radio buttons can be enabled by
    > document.getElementById.controlName.disabled = false.
    >
    > How do I enable the asp radio buttons in this script?
    >
    > Thank you
    >

    The problem is that getElementById.controlName is an array! One for each
    radio button with the same controlName
     
    Guess, Feb 22, 2005
    #4
    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. Eldon Ferran de Pol

    Client-side scripting from a radio button

    Eldon Ferran de Pol, Dec 15, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,096
    Munsifali Rashid
    Dec 15, 2003
  2. walterd
    Replies:
    1
    Views:
    3,496
    Eliyahu Goldin
    Jul 20, 2004
  3. Hiten
    Replies:
    1
    Views:
    700
    Vidar Petursson
    May 26, 2004
  4. ~Maheshkumar.R

    Enabling/ Disabling Radio button in client side = Asp.net

    ~Maheshkumar.R, Mar 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    217
    ~Maheshkumar.R
    Mar 22, 2005
  5. Replies:
    2
    Views:
    144
Loading...

Share This Page