473,545 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about radio buttons.

This is probably a simple question, but I am new to this so bear with me.

I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the
checkbox is checked, the 2 radio buttons are enabled using javascript. When
the checkbox is unchecked, the 2 radio button are disabled with javascript.

Here is the problem that I am seeing. When I submit the form with the radio
buttons disabled, the form returns with both radio buttons unchecked and
disabled. Next, if the checkbox is checked, the two radio buttons are
enabled by my javascript. If the user puts a check in one of the radio
buttons and does a submit, the server side does not see the check. When the
form returns back, both radio buttons are still unchecked. Does anyone have
any idea what is going on here?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Nov 18 '05 #1
3 1643
if(!IsPostBack)
{
}

You are probably setting them as unchecked in the page_load.....

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Ken Varn" <nospam> wrote in message
news:Ov******** ******@TK2MSFTN GP12.phx.gbl...
This is probably a simple question, but I am new to this so bear with me.

I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the
checkbox is checked, the 2 radio buttons are enabled using javascript.
When
the checkbox is unchecked, the 2 radio button are disabled with
javascript.

Here is the problem that I am seeing. When I submit the form with the
radio
buttons disabled, the form returns with both radio buttons unchecked and
disabled. Next, if the checkbox is checked, the two radio buttons are
enabled by my javascript. If the user puts a check in one of the radio
buttons and does a submit, the server side does not see the check. When
the
form returns back, both radio buttons are still unchecked. Does anyone
have
any idea what is going on here?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Nov 18 '05 #2
HI Curt,
I came across a script on your page below (Waiting Message)
Do you have the .Net version and what should be added to (ur time intensive
lookup here!!):-
<%@Language=VBS cript%>
<%
Response.write "<div id=MyText>Pleas e Wait...</div>"
Response.flush( )
..... your time intensive lookup here...
%>
<script language=javasc ript>
document.all.My Text.style.disp lay = 'none';
</script>
"Curt_C [MVP]" wrote:
if(!IsPostBack)
{
}

You are probably setting them as unchecked in the page_load.....

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Ken Varn" <nospam> wrote in message
news:Ov******** ******@TK2MSFTN GP12.phx.gbl...
This is probably a simple question, but I am new to this so bear with me.

I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the
checkbox is checked, the 2 radio buttons are enabled using javascript.
When
the checkbox is unchecked, the 2 radio button are disabled with
javascript.

Here is the problem that I am seeing. When I submit the form with the
radio
buttons disabled, the form returns with both radio buttons unchecked and
disabled. Next, if the checkbox is checked, the two radio buttons are
enabled by my javascript. If the user puts a check in one of the radio
buttons and does a submit, the server side does not see the check. When
the
form returns back, both radio buttons are still unchecked. Does anyone
have
any idea what is going on here?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------


Nov 18 '05 #3
I am unsetting them on the client side in javascript.

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:e8******** ******@TK2MSFTN GP11.phx.gbl...
if(!IsPostBack)
{
}

You are probably setting them as unchecked in the page_load.....

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Ken Varn" <nospam> wrote in message
news:Ov******** ******@TK2MSFTN GP12.phx.gbl...
This is probably a simple question, but I am new to this so bear with me.
I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the checkbox is checked, the 2 radio buttons are enabled using javascript.
When
the checkbox is unchecked, the 2 radio button are disabled with
javascript.

Here is the problem that I am seeing. When I submit the form with the
radio
buttons disabled, the form returns with both radio buttons unchecked and
disabled. Next, if the checkbox is checked, the two radio buttons are
enabled by my javascript. If the user puts a check in one of the radio
buttons and does a submit, the server side does not see the check. When
the
form returns back, both radio buttons are still unchecked. Does anyone
have
any idea what is going on here?
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------


Nov 18 '05 #4

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

Similar topics

6
3268
by: Craig Keightley | last post by:
I have a page that has n number of radio groups (yes/No) how can i prevent the form being submitted if more than one radio group is not selected? By default all radio groups are unchecked The problem i am facing is that i do not know how many yes/no radio groups will be generated
5
3082
by: Digital Puer | last post by:
I have the following HTML form: - radio button A (default selected) - radio button B - input field, of type "file" with "Choose" button - submit button I would like to have it so that if the user clicks on the "Choose" button of the input field (to select a file on the local disk), then radio button B is automatically
1
1549
by: Brian Henry | last post by:
In standard VB.NET you can group radio buttons in a pannel or frame and when you click on one in that frame or pannel the others will update relative to the selection so only the one you picked is selected, how do you do this similary in ASP.net? I know there is a radio group but what about a single radio button? how would you do it with a...
1
1595
by: Jay | last post by:
I need to validate 21 sets of radio buttons before submission to the server for calculation and storage. Is it best to validate on the client side using javascript or to validate on the server using the code behind vbscript. It seems that natural to validate before submission. If javascript is the best then how do I the variables. I...
3
2453
by: Ferret Face | last post by:
Hello, I have a web page that gets the user to select items from a list of options. This list is a set of independant Radio Buttons. I did not use a Radio Button List because I wanted the possibility of multiple selections. However, one item is "None of the above" and I have placed some logic (autopostback, etc.) that will remove all...
2
11940
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put them each in a GroupBox. All the examples I saw from the books or from the web show me how to add static radio buttons at design, or dynamically at...
7
2516
by: nathaniel.k.lee | last post by:
Is it not possible, in IE, to dynamically click a radio button? I'm grabbing some values from a database and using them to populate radio buttons on a page. I have alternate code for Firefox browsers using the setAttribute() function. Everything works as planned in Firefox but in IE, the buttons won't populate and, what's worse, I can't...
12
2533
html on wheels
by: html on wheels | last post by:
Greeting sports fans. In order to ask multiple questions and not have your radio buttons jump from one question to the next, what do you type to create a break between them. I am trying to complete a user document but the radio buttons do not function per each individual sentence. Instead, all of the radio buttons are linked up. I could write...
3
1114
by: SAM | last post by:
ll a écrit : <script type="text/javascript"> function checkform( f ) // f is the form to check { var txt1 = 'Please make a selection for the Learning Outcome :', txt2 = '\nYour favorite Ice Cream flavor is a required field.'+ '\nPlease try again.'
0
7410
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7437
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5343
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
4960
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
3466
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...
1
1901
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
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
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.