Client Side - click radio button - controls become enabled

Discussion in 'ASP .Net' started by UJ, Jul 19, 2005.

  1. UJ

    UJ Guest

    Can somebody help me please? I have two 'sets' of controls on a page. There
    are two radio buttons that enable the two sets (when radiobutton A is
    checked, set A should be enabled, B, Set B should be enabled). I know how to
    do it on the server side but not on the client side (I'd rather not have the
    page reload).

    Can somebody help me? I know I need to use Javascript but don't have a clue
    on how to do it.

    TIA - Jeffrey.
     
    UJ, Jul 19, 2005
    #1
    1. Advertising

  2. Jeffrey,

    Put every set in a container - a div, or a table or a table cell. For the
    radio buttons handle onclick event. In the event handler control the
    container visibility like this:

    myContainer.style.display='none';
    myContainer.style.display='inline';

    And you do need to learn some basics about javascript, no way around,

    Eliyahu

    "UJ" <> wrote in message
    news:...
    > Can somebody help me please? I have two 'sets' of controls on a page.

    There
    > are two radio buttons that enable the two sets (when radiobutton A is
    > checked, set A should be enabled, B, Set B should be enabled). I know how

    to
    > do it on the server side but not on the client side (I'd rather not have

    the
    > page reload).
    >
    > Can somebody help me? I know I need to use Javascript but don't have a

    clue
    > on how to do it.
    >
    > TIA - Jeffrey.
    >
    >
     
    Eliyahu Goldin, Jul 19, 2005
    #2
    1. Advertising

  3. UJ

    UJ Guest

    Thanks Eliyahu. I finally got the thing working correctly.

    Now here's the next problem - when I originally load the page, I don't have
    anything filled in so I know the startup state. But there are conditions
    where I will pre-load the page values which means I need to be able to set
    the screen accordingly.

    In other words, I need to be either able to set the visibility from both the
    client side and the server side, or I need to be able to on page load call
    some javascript to be able to activate the appropriate items.

    (I'm also going to post a separate item in here for this same problem.)

    Any suggestions?

    Thanks - Jeffrey.

    "Eliyahu Goldin" <> wrote in message
    news:...
    > Jeffrey,
    >
    > Put every set in a container - a div, or a table or a table cell. For the
    > radio buttons handle onclick event. In the event handler control the
    > container visibility like this:
    >
    > myContainer.style.display='none';
    > myContainer.style.display='inline';
    >
    > And you do need to learn some basics about javascript, no way around,
    >
    > Eliyahu
    >
    > "UJ" <> wrote in message
    > news:...
    >> Can somebody help me please? I have two 'sets' of controls on a page.

    > There
    >> are two radio buttons that enable the two sets (when radiobutton A is
    >> checked, set A should be enabled, B, Set B should be enabled). I know how

    > to
    >> do it on the server side but not on the client side (I'd rather not have

    > the
    >> page reload).
    >>
    >> Can somebody help me? I know I need to use Javascript but don't have a

    > clue
    >> on how to do it.
    >>
    >> TIA - Jeffrey.
    >>
    >>

    >
    >
     
    UJ, Jul 19, 2005
    #3
  4. Prepare css styles in design time and in run time set CssClass property for
    web controls on server side or className property on client side.

    Eliyahu

    "UJ" <> wrote in message
    news:...
    > Thanks Eliyahu. I finally got the thing working correctly.
    >
    > Now here's the next problem - when I originally load the page, I don't

    have
    > anything filled in so I know the startup state. But there are conditions
    > where I will pre-load the page values which means I need to be able to set
    > the screen accordingly.
    >
    > In other words, I need to be either able to set the visibility from both

    the
    > client side and the server side, or I need to be able to on page load call
    > some javascript to be able to activate the appropriate items.
    >
    > (I'm also going to post a separate item in here for this same problem.)
    >
    > Any suggestions?
    >
    > Thanks - Jeffrey.
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    > > Jeffrey,
    > >
    > > Put every set in a container - a div, or a table or a table cell. For

    the
    > > radio buttons handle onclick event. In the event handler control the
    > > container visibility like this:
    > >
    > > myContainer.style.display='none';
    > > myContainer.style.display='inline';
    > >
    > > And you do need to learn some basics about javascript, no way around,
    > >
    > > Eliyahu
    > >
    > > "UJ" <> wrote in message
    > > news:...
    > >> Can somebody help me please? I have two 'sets' of controls on a page.

    > > There
    > >> are two radio buttons that enable the two sets (when radiobutton A is
    > >> checked, set A should be enabled, B, Set B should be enabled). I know

    how
    > > to
    > >> do it on the server side but not on the client side (I'd rather not

    have
    > > the
    > >> page reload).
    > >>
    > >> Can somebody help me? I know I need to use Javascript but don't have a

    > > clue
    > >> on how to do it.
    > >>
    > >> TIA - Jeffrey.
    > >>
    > >>

    > >
    > >

    >
    >
     
    Eliyahu Goldin, Jul 20, 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. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
    Replies:
    2
    Views:
    6,496
    rick74
    May 27, 2008
  2. walterd
    Replies:
    1
    Views:
    3,467
    Eliyahu Goldin
    Jul 20, 2004
  3. Aymer
    Replies:
    1
    Views:
    390
    Alvin Bruney
    Sep 19, 2003
  4. Hiten
    Replies:
    1
    Views:
    632
    Vidar Petursson
    May 26, 2004
  5. Matt Adamson
    Replies:
    0
    Views:
    173
    Matt Adamson
    Feb 25, 2007
Loading...

Share This Page