Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How to identify duplicate form elements with same name in a funcation???? within the HTML & CSS forums, part of the Web Development category; Hi guys, I have multiple price and quantity fields and their total ( price * quantity) in a loop with same form name and I want to calculate the total ...
|
|||||||
|
|||
|
How to identify duplicate form elements with same name in a funcation????
Hi guys,
I have multiple price and quantity fields and their total ( price * quantity) in a loop with same form name and I want to calculate the total in each row with onChange event. Since they have same name how do I identify the exact fields. Please see example and give me a hint on how I can grab the exact changed field to calculate the corresponding total. The grand total field is outside the loop and would be the sum of all totals % for (i=0; i<5; i++) { %> <% } %> Pls guide me to correct this. Thanks, Riju. |
| Sponsored Links |
|
|||
|
Hi,
When you name/id two or more HTML elements with the same name/identifier, the corresponding JavaScript objects are put into an array of that name, so they can be handled as a group. Why use the same names? Only a few types of elements are designed to be used in groups (radio buttons, e.g.). Identifiers should be unique. ![]() Karthik |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to identify the Unit test elements? | radhika.inamdar | Test Cases | 1 | 08-25-2009 06:08 AM |
| Form Bean vs Action Form | ramesh.sure | Java | 2 | 09-05-2008 06:11 AM |
| How to get the data of some fields from previous form to current form? | naname | QTP | 4 | 04-29-2008 05:26 PM |
| Delete duplicate record | raghvendra_rai | SQL Server | 15 | 03-20-2008 11:29 PM |
| Select unique elements from repeated elements | ImMadhumathi | AJAX & XML | 0 | 03-03-2008 01:46 PM |