Shortening if / else string
I am wondering if there is anyway I can integrate the information for an If / Else statement in one central location instead of having to write out everything. My form takes a trailer gross weight and subtracts the weight of the empty trailer. What I have works, but is bulky and takes up a lot of memory. Here is a partial example (add 35 more trailers and 13 form entries):
else if (this.getField("QTrailerF").value == '1R793')
{
if (heelf>0) event.value = heelf-13360;
}
else if (this.getField("QTrailerF").value == '1r793')
{
if (heelf>0) event.value = heelf-13360;
}
else if (this.getField("QTrailerF").value == '8058')
{
if (heelf>0) event.value = heelf-22480;
}
else if (this.getField("QTrailerF").value == '1R504')
{
if (heelf>0) event.value = heelf-13200;
}
else if (this.getField("QTrailerF").value == '1r504')
{
if (heelf>0) event.value = heelf-13200;
}
else if (this.getField("QTrailerF").value == '1R553')
{
if (heelf>0) event.value = heelf-13300;
}
else if (this.getField("QTrailerF").value == '1r553')
{
if (heelf>0) event.value = heelf-13300;
}
else if (this.getField("QTrailerF").value == '4180')
{
if (heelf>0) event.value = heelf-13090;
}
