473,587 Members | 2,547 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1919
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.sty le.display='non e';
myContainer.sty le.display='inl ine';

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

Eliyahu

"UJ" <fr**@nowhere.c om> wrote in message
news:Or******** ******@TK2MSFTN GP15.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.co m> wrote in message
news:eB******** ******@TK2MSFTN GP12.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.sty le.display='non e';
myContainer.sty le.display='inl ine';

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

Eliyahu

"UJ" <fr**@nowhere.c om> wrote in message
news:Or******** ******@TK2MSFTN GP15.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.c om> wrote in message
news:e9******** ******@TK2MSFTN GP14.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.co m> wrote in message
news:eB******** ******@TK2MSFTN GP12.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.sty le.display='non e';
myContainer.sty le.display='inl ine';

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

Eliyahu

"UJ" <fr**@nowhere.c om> wrote in message
news:Or******** ******@TK2MSFTN GP15.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
2089
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 the same page. I can do it the server-side code but I need to accomplish these changes on the client-side. The problem I am having is the the...
1
2904
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 server click event, save data, write a client-side script to set 'ynDisable' to true or false, and then use general client-side code in window's onload...
1
2219
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 based on which Radio Button is selected. Regards
2
2079
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 reason we came up with for this was because we had a PageBase base class for all our pages. This base class takes the controls on the child page class...
4
5316
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 that can be ignored). When I press the button the first time, the click handler hides the textbox. Pressing the button a second time unhides the...
7
41774
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 become "greyed out". Ie they can no longer be selected. I assume i need to create an event from the first button being pushed and then do if...
2
2295
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 add that it behaves fine in Firefox, but IE is unable to re-enable the radio button. IE is fine if the radio button starts in an enabled state.
10
2029
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 whole day is then displayed in cels of a table. The user has then to click in a cel representing a hour of the day and an object (book ..), and...
2
2652
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 Submit and Cancel button. When the page loads, if I click the Cancel button, the server-side event fires as normal.
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.