I am trying to build a quote form where the price element varies based on volume (the entered quantity).
I do not know how to obain the right price (37price) for the entered quantity(37quantity) so it will calculate the correct extended price (37extprice).
Example;
37price is $1000.00 if 37quantity <5
37price is $900.00 if37 quantity <10
37price is $850.00 if 37quantity <50
37price is $800.00 if 37quantity <150
37price is $750.00 if 37quantity >149
I am using the following Actionscripts -
function ff_37quantity_action(element, action)
{
ff_getElementByName('37extprice').value =
Number(ff_getElementByName('37price').value) *
Number(ff_getElementByName('37quantity').value);
}
// ff_37quantity_action<br><br>
function ff_37price_action(element, action)
{
ff_getElementByName('37extprice').value =
Number(ff_getElementByName('37price').value) *
Number(ff_getElementByName('37quantity').value);
}
// ff_37price_action<br><br>
function ff_37extprice_action(element,action)
{
ff_getElementByName('37extprice').value = 0;
{
ff_getElementByName('37extprice').value =
Number(ff_getElementByName('37price').value) *
Number(ff_getElementByName('37quantity').value);
}
}
// ff_37extprice_action