hello guys,
this is my first post and I had been looking for some help with a php/javascript form that i was passed down.
the form is a 93 files mess, however i got to understand the functions and how variables pass from file to file. so i was able to make most of the changes except one
In the calculator.js
I have a function that creates the subtotals and displays them on the screen.
I can't show the entire function cuz is over 600 lines but i'll explain my situation below
I have a drop-down selection box that need to be add-up in the example code below.
for radio buttons classes are used to group the price, you can see it in $('.hsis:radio:checked')
for check boxes ids are used to display the price $('#pwrcm:checkbox:checked')
however in a code with similar syntax i need to show the price of each drop down selections. how could it be done?
I tried $('#hdtv:select:selected') and updated the variable names but no luck
function addup_subtotals() {
var hsi_subtotal = $('.hsis:radio:checked').val();
if(isNaN(hsi_subtotal)) {hsi_subtotal=0;} else {hsi_subtotal=parseFloat(hsi_subtotal);}
var pwrcm_subtotal = $('#pwrcm:checkbox:checked').val();
if(isNaN(pwrcm_subtotal)) {pwrcm_subtotal=0;} else {pwrcm_subtotal=parseFloat(pwrcm_subtotal);}
has anyone seen something like this before