Geeks Talk

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.

How to identify duplicate form elements with same name in a funcation????

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 ...

Go Back   Geeks Talk > Web Development > HTML & CSS
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 06-14-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 991
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
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.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-25-2009
Junior Member
 
Join Date: Jun 2009
Location: Bangalore
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Karthik_Deepa is on a distinguished road
Smile Re: How to identify duplicate form elements with same name in a funcation????

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
Reply With Quote
Reply

  Geeks Talk > Web Development > HTML & CSS

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


All times are GMT -4. The time now is 03:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved