473,670 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to retrieve the checkbox name

17 New Member
using Two dimensional array how to retrieve the checkbox name in java script
Oct 10 '06 #1
1 1462
acoder
16,027 Recognized Expert Moderator MVP
To get the checkbox object:
Expand|Select|Wrap|Line Numbers
  1. //either use the ID:
  2. var checkbox = document.getElementById("checkboxID");
  3. // or use getElementsByTagName:
  4. checkboxes = document.getElementsByTagName("input");
  5. for (i = 0; i < checkboxes.length; i++) {
  6.     if (checkboxes[i].type == "checkbox") {
  7.         // we have a checkbox here...
  8.     }
  9. }
May 22 '08 #2

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

Similar topics

8
2598
by: Jack | last post by:
Hi, Here is my problem: I am logging in to a page, where the page retrieves a record from a database. The text boxes are used in the display formto let the users update the fields, if they desire to. The colorpreference and foodpreference fields are text fields while the FinalUpdate field is a yes/no field in Access Database.
3
1651
by: Cui | last post by:
Hi, and sorry for my poor english I have dynamically created some checkbox in a table, and I have also attached to it some event. mycurrent_cell = document.createElement("TD") ; chbox = document.createElement("INPUT") ; chbox.type = "CHECKBOX" ; chbox.name = "CHB_" & col_i ; // col_i is an integer.... chbox.attachEvent("onclick", chbox_click) ;
3
2056
by: niftyhawk | last post by:
Hi All, I have a php page say "abc.php" generating the following HTML. I am posting the form action to another php page say "TestCheckbox.php". How do I retrieve in "TestCheckbox.php" which checkboxes are checked in "abc.php"? abc.php ========
6
4342
by: Daz | last post by:
Hi everyone. Firstly, I apologise if this i not what you would call a PHP problem. I get quite confused as to what lives in which realm, so if this shouldn't be posted here, please suggest where I should post it. I have created a form, which consists of a list of items, each with a checkbox. When a checkbox is checked or unchecked, the page should be refreshed. During the refresh, the data is validated and the MySQL database is...
1
2412
by: whidbey | last post by:
Hello friends, I am whidbey, new to thescripts and dot net as well.I am working over Online Shopping Cart,web application.I design a page (webform5.aspx) where user search books then select the books to buy from the datagrid. User can select books using checkboxes in the datagrid. The selected books are stored in a session variable name session("temp") which is a dataset type.After storing dataset in session (in bold letters),user will...
4
6734
by: Matt | last post by:
I am no JavaScript guru so please bear with me and be as detailed as possible with your response. I thank you in advance. I have an ASP page that contains form elements. I also have an inline frame on this page that contains multiple checkboxes with the same name/id. This is a search form and users need the ability to select which categories they would like to search for. I have to put the categories in an inline frame to save real...
14
3090
by: David | last post by:
Hi, I have a form on which a user can select a checkbox against a record. Each checkbox carries the RecordID of a product. ---------------------------------------------------------------- I am trying to print the following report:- Details for product 1
6
4387
by: dmorand | last post by:
I'm populating some checkboxes from a query result. I'm having a problem retrieving the data to file it to my database. How do I retrieve the checkbox values when the names are variable names? I need to get all of the checkbox values and their on/off value. <ol class="comments"> <cfoutput query="getComments"> <cfif (category eq 2)> <li><input type="checkbox" class="noBox" name=#commentID#...
4
6492
by: TechnoAtif | last post by:
Hi ALL I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be retrieved using list/menu box. When i check only a single checkbox to insert the checked category ,selecting that category through list box gives out the entire data of the user corresponding to that category. However when i check multiple checkboxes and...
9
7370
by: magix | last post by:
If I have <form action="process.asp" method="get" name="form1"> .... .... <input TYPE=checkbox name=sports VALUE=Cricket> <input TYPE=checkbox name=sports VALUE=Swimming> <input TYPE=checkbox name=sports VALUE=Football>
0
8468
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8901
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8814
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8591
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8660
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6213
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4209
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4390
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.