Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Client Side - click radio button - controls become enabled

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
UJ - 19 Jul 2005 13:01 GMT
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 - 19 Jul 2005 13:30 GMT
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

> 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
[quoted text clipped - 6 lines]
>
> TIA - Jeffrey.
UJ - 19 Jul 2005 20:38 GMT
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.

> Jeffrey,
>
[quoted text clipped - 23 lines]
>>
>> TIA - Jeffrey.
Eliyahu Goldin - 20 Jul 2005 10:38 GMT
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

> Thanks Eliyahu. I finally got the thing working correctly.
>
[quoted text clipped - 40 lines]
> >>
> >> TIA - Jeffrey.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.