jQuery change totals when many form textboxes are changed

I have about 25 textboxes where users enter how many of each component they want, and the text box which holds the total should change on the fly.   Is there a way to check ALL of the textboxes for changes as they happen instead of writing out each one?
This is here:
http://www.cloudconnect.net/pricing-estimate
I thought this was working, but it is not, so I can't get to work either. It works in Firebug though, so I don't understand why it doesn't work on the page

function recalculateTotal() {
    var count = $('#edit-submitted-users-desktop-users').val();
    count = parseFloat( count );
    $('#edit-submitted-users-total-users-price').val( count * p1 );
}
var fieldCount = $('#edit-submitted-users-desktop-users');
fieldCount.change( recalculateTotal );
LVL 17
nanharbisonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michel PlungjanIT ExpertCommented:
You need unique IDs

Why not use class or name?
0
nanharbisonAuthor Commented:
Each textbox has a unique ID. How do I use a class or name?
0
Michel PlungjanIT ExpertCommented:
Not on the page I looked at. There were at least two fields with the same ID and your code here obviously try to get at more than one field using one ID

Please have a look here

http://api.jquery.com/attribute-starts-with-selector/
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

nanharbisonAuthor Commented:
I have set up the form with with field sets, so those are the same for groups of textboxes, but the input textboxes are all different.
0
Michel PlungjanIT ExpertCommented:
You need UNIQUE ids for all elements on a page
0
nanharbisonAuthor Commented:
Ugh, this is a Drupal site, and the module created these non-unique IDs, and I have no control over that. Is this why the javascript isn't working? it works perfectly when I run it in Firebug.
0
Michel PlungjanIT ExpertCommented:
How come you have no control? Can't you edit the Drupal templates?
And what do you mean "it works in firebug" I used firebug to see you did not have unique ids
0
nanharbisonAuthor Commented:
Where do you look in firebug to see there are IDs that are not unique?
0
Michel PlungjanIT ExpertCommented:
Apologies. Perhaps I saw

edit-submitted-users-desktop-users-wrapper
and
edit-submitted-users-desktop-users
0
Michel PlungjanIT ExpertCommented:
So the selector could be

$("input[name|='submitted[users]']")

http://api.jquery.com/attribute-contains-prefix-selector/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nanharbisonAuthor Commented:
I did the code for this question on my own, by brute force. It isn't elegant at all, but it works. But I appreciate the time mplungjan put in to look at what I was doing.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.