473,406 Members | 2,707 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,406 software developers and data experts.

Getting the collection of checkboxes

Hi,
I have a form wherein there are around 200-300 rows of homogenous
data, each having around 30 input fileds of its own.So totally, there
are more than 6000 input fields . Now, when the user submits this page,
i need to loop through the checkboxes and identify the ones that are
checked. I can't use the getElementsByName() since the checkbox names
are different. I'm using getElementsByTagName("input"). Because of the
huge amount of data, this method takes around 4-5 secs to evaluate
before submitting the form. Is there some way to get the collection of
checkboxes without having to loop through all the input fields?

Jan 31 '06 #1
1 2443
vinod wrote:
Hi,
I have a form wherein there are around 200-300 rows of homogenous
data, each having around 30 input fileds of its own.So totally, there
are more than 6000 input fields . Now, when the user submits this page,
i need to loop through the checkboxes and identify the ones that are
checked. I can't use the getElementsByName() since the checkbox names
are different. I'm using getElementsByTagName("input"). Because of the
huge amount of data, this method takes around 4-5 secs to evaluate
before submitting the form. Is there some way to get the collection of
checkboxes without having to loop through all the input fields?

No. But if you supply the loop code, you may get suggestions for
optimisation.

For example, it may be faster to use the forms.elements collection to
get the list, or to build an array of references onload so you have them
already, or maybe to track click events on each checkbox and remember
whether they are checked or not so you already know their status when
the form is submitted.

Show some code...
--
Rob
Jan 31 '06 #2

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

Similar topics

3
by: jason | last post by:
How does one loop through the contents of a form complicated by dynamic construction of checkboxes which are assigned a 'model' and 'listingID' to the NAME field on the fly in this syntax:...
0
by: D. Shane Fowlkes | last post by:
I have a form with a CheckBoxList which is created from a SQLDataReader. It contains Staff personnel and I use the ID and LogOnName (a string) to build the CBL. All works fine. I also have a...
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
4
by: antonyliu2002 | last post by:
I am new to the .NET framework. I know this has been discussed many times in this group. I also read extensively here, however, I am in bad luck: none of the sample code provided in this forum...
1
by: Ruslan Shlain | last post by:
I have a page where I dynamically create checkboxes. When the time comes I need to know if any of them checked and if they are check I need to update DB to reflect the changes on the page. I know...
4
by: jim.long | last post by:
I can't seem to get the checked value from the checkboxes! Is there something wrong with the code? It loops through the repeater item collection correctly. HTML: <asp:repeater id="rPrinterJobs"...
7
by: astro | last post by:
I am not farmilar with the object model for webforms. I want to loop through the web form controls - pulling out the checkboxes on the form like the following: For Each ctrl In Me.Controls ...
10
by: Bishman | last post by:
Hi, I need to programmatically allow or disallow the selection of multiple checkboxes on a form . At certain times I only want to allow a single selection, at other times I may wish to allow...
4
by: jeet | last post by:
Plz help me.Problem is that On the first page I display all other user with checkbox and give user option to select only two user which he wants to send message. Tell me please how I'll get those...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
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
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,...

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.