I'd try debugging the value of document.frmBTO.elements.length because if you never enter the loop, subtotal is a string, NotANumber.
Mozilla has a handy little debugger (Venkman) you may want to use on te Javascript.
On 1/31/06, Profox <profox .at. dbxtech .DOT com> wrote: > > for (i = 0 ; i < document.frmBTO.elements.length ; i++) { > if (document.frmBTO.elements[i].name.substring(0,8) == "ctrlBTO_") { > Option_index = document.frmBTO.elements[i].selectedIndex; > Option_price = document.frmBTO.elements[i].options[Option_index].price; > price = "" + parseFloat(Option_price); > subtotal += 1 * price; > // subtotal += quantity * price; > }
-- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com
©2006 Ted Roche |