Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Client Side - click radio button - controls become enabled

Reply
Thread Tools

Client Side - click radio button - controls become enabled

 
 
UJ
Guest
Posts: n/a
 
      07-19-2005
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.


 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-19-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.
>
>



 
Reply With Quote
 
 
 
 
UJ
Guest
Posts: n/a
 
      07-19-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>>
>>

>
>



 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-20-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> 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.
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button disabled and re-enabled in client side not firing server-side click event. =?Utf-8?B?QmluIFNvbmcsIE1DUA==?= ASP .Net 2 05-27-2008 09:57 AM
Handling client side button click events to interact with other controls Matt Adamson ASP .Net Web Controls 0 02-25-2007 11:37 AM
Trap Client Side Radio Button click event walterd ASP .Net 1 07-20-2004 08:19 AM
Radio button List problem: How to find value of Radio button list's Selected Item using javascript?? Hiten ASP .Net Web Controls 1 05-26-2004 10:32 AM
asp:button w/ client side and server side click event Aymer ASP .Net Web Controls 1 09-19-2003 03:10 PM



Advertisments