473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Client Side - click radio button - controls become enabled

UJ
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.
Nov 19 '05 #1
3 1912
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" <fr**@nowhere.com> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
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.

Nov 19 '05 #2
UJ
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" <re*************@monarchmed.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
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" <fr**@nowhere.com> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
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.


Nov 19 '05 #3
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" <fr**@nowhere.com> wrote in message
news:e9**************@TK2MSFTNGP14.phx.gbl...
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" <re*************@monarchmed.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
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" <fr**@nowhere.com> wrote in message
news:Or**************@TK2MSFTNGP15.phx.gbl...
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.



Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Isa Terzi | last post by:
I am developing an application in ASP.NET with C#. I have multiple radio boxes at the main page. Based on the selection of the user, I want to disable some of the text boxes, drop down boxes in...
1
by: Bin Song, MCP | last post by:
Hi all I got a strange problem In my webform, I have a server-side Button "btnDisable" to save some data and enable or disable all other fields in this form based on the data. The logic is: on...
1
by: walterd | last post by:
Hi I have a DataGrid with dynamically created Radio Buttons using ItemTemplate. How can I catch the Click Event for the selected Radio Button in Client Side? I need to perform some validation...
2
by: Fourge | last post by:
Hi, I have run into a very strange scenario. In developing an ASP.NET application on framework version 1.1, I found that certain client-side validation scripts were not being rendered. The...
4
by: Lee Chapman | last post by:
Hi, Can anyone tell me why in the code below, the call to ClearChildViewState() has no effect? To paraphrase the code: I'm using view state. I have a textbox and a submit button (and a label...
7
by: code100579 | last post by:
Hi there, sorry if this is a really simple question. I need to write code for: If a button is pushed and then one variety of other buttons is pushed then certain options on the program will...
2
by: xazos79 | last post by:
Hi All, I've come across the problem of not being able to re-enable a radio button with javascript if its initial state has been disabled in the Page_Load() method of the code behind. Might i...
10
by: Ben | last post by:
Hi, I made an application in classic asp (reservation of books and video stuffs for students) and want to migrate to asp.net. The user has to chose a date, then pushung on a submit button. The...
2
by: Stuart Whiteford | last post by:
Hi, I asked this back in January without answer and forgot about it until now. I've got a basic web form, two textboxes, a couple of radio button groups, some required field validators, and a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.