Run Function on every change in an input element: JQuery
I have a form called "wizard". Everytime any input element is changed, I want a Javascript function to run and calculate something. I have the following:

    // update hidden field "channels" in wizard based on servers/cores
    $('form#wizard select[name=servers], form#wizard select[name=cores]').change(function() {
    	var channels = parseInt($('form#wizard select[name=servers]').val()) * parseInt($('form#wizard select[name=cores]').val());
    	$('#yellow').val(channels);
    	$('#yellow').change();
    	alert(channels);
    });


The above is wrapped around:

    $(document).ready(function() {

The above does not seem to do what I want. Do I have to specifically have to have each input field with an onchnage action??

Thanks all

Run Function on every change in an input element: JQuery
===

I have a form called "wizard". Everytime any input element is changed, I want a Javascript function to run and calculate something. I have the following:

    // update hidden field "channels" in wizard based on servers/cores
    $('form#wizard select[name=servers], form#wizard select[name=cores]').change(function() {
    	var channels = parseInt($('form#wizard select[name=servers]').val()) * parseInt($('form#wizard select[name=cores]').val());
    	$('#yellow').val(channels);
    	$('#yellow').change();
    	alert(channels);
    });


The above is wrapped around:

    $(document).ready(function() {

The above does not seem to do what I want. Do I have to specifically have to have each input field with an onchnage action??

Thanks all
