By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,128 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Enable submit button when one checkbox ticked

P: 6
hi,

Lets consider if i have to display my data dynamically using ASP ( the no of data to be displayed is an unknown), My data will be in this format

Checkbox_1 data_1a data_1b
Checkbox_2 data_2a data_2b
. . . .
. . . .
. . . .
Checkbox_n data_na data_nb

submit_button

================================================== ==
conditions:

1) the data field will be disabled unless otherwise the corresponding checkbox is checked

2) at least one checkbox must be checked in order to enable the submit button

================================================== =====

a) Data Field

The data field will be filled with the data paging from the SQL database with the call statement RS("name").


b) Form name

The name of the data field ( form ) will be named accordingly to the no-th associated with the name in the SQL i.e. RS ("no")

For example :

<input type="text" disabled name="<% =RS("no")%>" value="<% =RS("name")%>" size="16">


c) Checkbox

Again, the name of the checkbox will be named accordingly to the no-th associated with the name in the SQL i.e. RS ("no")

For example
<input type="checkbox" onclick="call_JS_function" name="<% =RS("no")%>" value="ON">

================================================== ====


i humbly request the experts to give me advice and guide.

Thank you in advance and have a nice day.
Aug 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: 6
Hi guys,

Lets consider if i were have 5 checkbox and a disabled submit button, how could i enable the submit button with at least one checkbox being ticked?

Thank you in advance and have a nice day.
Sep 27 '06 #2

10K+
P: 13,264
Hi guys,

Lets consider if i were have 5 checkbox and a disabled submit button, how could i enable the submit button with at least one checkbox being ticked?

Thank you in advance and have a nice day.
Could have an on change on each checkbox that call a function which enables the submit button if that checkbox is checked.
If you want to disable the button when none of the checkboxes are selected, you'd have to go through all the checkboxes in that function(for checkbox unchecked) and disable the button if all are unchecked
Sep 27 '06 #3

P: 6
Thank you for your kind reply
Sep 27 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.