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

not able to detect a single checkbox.

Hi,

I have a form with checkboxes.

if i do a alert(form.testid.length), it will echo me the number of
chexkboxes

But if there is only a single checkbox, i wouldnt be able to retrieve the
length of the chkbox

for(i=0; i<form.testid.length; i++)
{
if (form.testid[i].checked==true)
{
c = 1;

}
}

pls advise, Thanks

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 7 '07 #1
1 1095
Lee
Eric Layman" <namyalcire[at no spam]gmail.comsaid:
>
Hi,

I have a form with checkboxes.

if i do a alert(form.testid.length), it will echo me the number of
chexkboxes

But if there is only a single checkbox, i wouldnt be able to retrieve the
length of the chkbox

for(i=0; i<form.testid.length; i++)
{
if (form.testid[i].checked==true)
{
c = 1;

}
}

pls advise, Thanks
Like most technical newsgroups, this one has a FAQ.
The answer to your frequently asked question is at:
http://www.jibbering.com/faq/#FAQ4_13
--

Feb 7 '07 #2

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

Similar topics

4
by: SiuLoBow | last post by:
Hi, Is there anyway to detect the ActiveX control is able to run on the browser or not? After I installed the ActiveX control to my system, user sometimes switch the secruity setting to "not...
3
by: TJS | last post by:
trying to detect status of the checkbox to produce an alert can someone guide me to a fix on this? <input id="badcustomers" type="checkbox" checked name="badcustomers" >............... <script...
2
by: Andrew | last post by:
Hi, I display a repeater in a web page, when i click on the next button, I want to loop thru the repeater to detect the checkbox controls. Previously this code works, but now .... I used the...
3
by: Charlie | last post by:
In the top portion of the DateTimePicker, where the value of the date is displayed, how can I detect whether the month or day or year is currently focused, or, if ShowCheckBox = True, whether the...
0
by: Paul | last post by:
Hello, I have a datagridview with a checkbox in a column, and I want to detect when the user change the value of the checkbox in the event CheckedChanged, but I only detect that the value is...
2
by: Kevin | last post by:
I've been looking all over and I can't seem to find what ought to be simple. I need to disable a drop down when a checkbox is checked, and enable it when same checkbox is unchecked. I've...
0
by: Ryan Liu | last post by:
I have a DataGrid with only one column is editable. It is a DataGridViewCheckBoxColumn. I want to detect if the any checkbox state is changed. So I listen to ColumnChanged event. But whenever...
1
by: infernodeep | last post by:
Hi, I have a dynamically generated form, and each listing contains a checkbox named 'del'. The users checks the 'del' checkbox next to each listing they wish to delete, and click the submit...
2
by: Derek Hart | last post by:
How can I detect if a control contains a property. Need to use reflection somehow? If ctl.ContainsProperty("Tag") Then ctl.Tag = "some tag information"
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...
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
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,...
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,...

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.