Are you only going to have one item per page? For instance, one shirt with the
inputs for the quantity and sizes. Or, are there multiple items with multiple
quantities and sizes?
an onchange on each quantity input to update the total variable by passing
this.value, or something similiar. The call to the update total function can
also adjust your total fields' values.