Criterion Problems
-
Hello;
I couldn’t reach a conclusion on one criterion. My code is located below. If fieldname26 is A, I want it to take the values aa bb oo, if B, the corresponding values, and finally criterion1 = aa + bb, whichever option I choose. But there is no result, what am I doing wrong?(function() { var kriter1 = ''; if (fieldname26 === 'A') { aa = 75; bb = 0; oo = 0; } else if (fieldname26 === 'B') { aa = 0; bb = 75; oo = 0; } else if (fieldname26 === 'O') { aa = 0; bb = 0; oo = 100; } else if (fieldname26 === 'AB') { aa = 50; bb = 50; oo = 0; } if (fieldname28 === 'A') { ab = 75; bo = 25; oo = 0; } else if (fieldname28 === 'B') { ab = 0; bo = 75; oo = 0; } else if (fieldname28 === 'O') { ab = 0; bo = 0; oo = 100; } else if (fieldname28 === 'AB') { ab = 50; bo = 50; oo = 0; } if (fieldname25 === 'N' && fieldname29 === 'N') { rhFaktoru1 = 0; rhFaktoru2 = 100; } else if (fieldname25 === 'P' && fieldname29 === 'N') { rhFaktoru1 = 75; rhFaktoru2 = 25; } else if (fieldname25 === 'N' && fieldname29 === 'P') { rhFaktoru1 = 75; rhFaktoru2 = 25; } else if (fieldname25 === 'P' && fieldname29 === 'P') { rhFaktoru1 = 93.75; rhFaktoru2 = 6.25; } kriter1 = aa+bb; // Assign the value to kriter1 jQuery('#calculation-kriter1').html(kriter1); jQuery('.kriter1-aciklama').html('Hata Mesaj?: '); jQuery('.kriter1-sonuc').html(kriter1); return [kriter1]; })();
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Criterion Problems’ is closed to new replies.