Associate
- Joined
- 13 Jul 2009
- Posts
- 1,133
- Location
- Cambs
I have the following calculation:
if (this.getField("CB-Acrobatic").value=="3" &&
this.getField("Acrobatics-Ranks").value>9) {
event.value = 4;
} or
else event.value = "0";
But I also want it to check the following:
if (this.getField("CB-Acrobatic").value=="3" &&
this.getField("Acrobatics-Ranks").value<9) {
event.value = 2;
} or
else event.value = "0";
How would I go about combining these two calculations into one tidy script?
Also can anyone recommend a decent book to learn javascript from?
if (this.getField("CB-Acrobatic").value=="3" &&
this.getField("Acrobatics-Ranks").value>9) {
event.value = 4;
} or
else event.value = "0";
But I also want it to check the following:
if (this.getField("CB-Acrobatic").value=="3" &&
this.getField("Acrobatics-Ranks").value<9) {
event.value = 2;
} or
else event.value = "0";
How would I go about combining these two calculations into one tidy script?
Also can anyone recommend a decent book to learn javascript from?