Hi,
as Albert mentioned already, you can’t use the field names in a variable.
An option would be to call your fields by reference and not by name but I don’t know if it is suitable for your situatioin.
Anyhow, here it is.
Create an array of your field addresses (may be in the onLoad event)
[pricearray] = array(&{price_1}, &{price_2}, you get the picture…); // the &-parameter stores the address of a field/variable
And somewhere down the road
function calcprice($nonline)
{
//you could do your array definition here as well, than you don’t need a global variable
[pricearray][$nonline] = $value; //don’t forget that the array starts at 0
}
I think this should do the trick.
jsb