So here is what I tried . . . now nothing is working. Can you look and see what I have done wrong here. I am sure it is obvious.
var input = Tiggr('baseunit').val();
var from = Tiggr('convertfrom').val();
var to = Tiggr('convertto').val();
if (from == 'Acres') {
if (to == 'Acres'){
var total = input * 0;
alert ( " ERROR: You are converting to the same unit of measurement! ");
}
else if (to == 'Poles / Perches / Rods'){
var total = input * 160;
alert (input + " acres equal "+ total + " Poles, Perches or Rods" );
}
else if (to == 'Square Feet') {
var total = input * 43560;
alert (input + " acres equal "+ total + " Square Feet" );
}
}
if (from == "Poles / Perches / Rods') {
if (to == 'Poles / Perches / Rods'){
var total = input * 0;
alert ( " ERROR: You are converting to the same unit of measurement! ");
}
if (to == 'Acres'){
var total = input / 160;
alert (input + " Poles, Perches or Rods equal "+ total + " Acres" );
}
else if (to == 'Square Feet') {
var total = input * 43560;
alert (input + " Poles, Perches or Rods equal "+ total + " Square Feet" );
}
}
if (from == "Square Feet') {
if (to == 'Square Feet'){
var total = input * 0;
alert ( " ERROR: You are converting to the same unit of measurement! ");
}
if (to == 'Acres'){
var total = input / 43560;
alert (input + " Square Feet equal "+ total + " Acres" );
}
else if (to == 'Poles / Perches / Rods') {
var total = input * 43560;
alert (input + " Square Feet "+ total + " Poles, Perches or Rods" );
}
}