+ Start a Discussion
Micky MMicky M 


Hi all im trying to get the value of a picklist from an array of rows on a vf page so i have something like

select list 1
   Some stuff
select list 2
   Some stuff
select list 3 
   Some stuff

so im using 

function calcBandingTotal(value)
                var row = value.getElementsByTagName("td");
                var listvalue = row[2].getElementsByTagName("select")[0].value);

                var startQuantity = parseFloat(row[2].getElementsByTagName("input")[0].value);
                var endQuantity = parseFloat(row[3].getElementsByTagName("input")[0].value);
                var unitSellPrice = parseFloat(row[5].getElementsByTagName("input")[0].value);
                var banding = endQuantity - startQuantity;
                var total = banding * unitSellPrice;
                //Banding total column        
                row[4].getElementsByTagName("span")[0].innerHTML = banding.toFixed(2);
                //Banding total column        
                row[6].getElementsByTagName("span")[0].innerHTML = "GBP " + total.toFixed(2);

and its this line thats causing the problem 

var listvalue = row[2].getElementsByTagName("select")[0].value);

does anyone know how to do this?


It looks like you have an extra parenthesis at the end of that line, after .value.