rjusa
12-02-2003, 09:28 AM
this is a bit frustrating on 4 hrs. sleep but here goes: I have a series of forms...input value in 1st form, successfully gets passed to the second with this alert scheme
function sum(objRef) {
var result = 0;
result += document.PB2.PercentPB1.value - 0;
result += document.PB2.PercentPB2.value - 0;
if (result > 100)
alert("Your total percent allocation exceeds 100%...please check your percent distributions\nFirst Primary: " + $PercentPB1$ +"%");
if (result > 100)
document.PB2.PercentPB2.value="";}
when I go to pass values from the 2nd form to the 3rd the alert scheme doesn't work...to make sure the values from 1 & 2 were getting passed I put in temporary text boxes and the little buggers do show up...the 3rd form is named correctly (SB1) and the alert code is as follows:
function sum(objRef) {
var result = 0;
result += document.SB1.PercentPB1.value - 0;
result += document.SB1.PercentPB2.value - 0;
result += document.SB1.PercentSB1.value - 0;
if (result > 100)
alert("Your total percent allocation exceeds 100%...please check your percent distributions
\nFirst Primary: " + $PercentPB1$ +"%" + "\nSecond Primary: " + $PercentPB2$ +"%");
if (result > 100)
document.SB1.PercentSB1.value="";
}
OK, where did I screw this one up? Help please!
Thanks,
Ron
function sum(objRef) {
var result = 0;
result += document.PB2.PercentPB1.value - 0;
result += document.PB2.PercentPB2.value - 0;
if (result > 100)
alert("Your total percent allocation exceeds 100%...please check your percent distributions\nFirst Primary: " + $PercentPB1$ +"%");
if (result > 100)
document.PB2.PercentPB2.value="";}
when I go to pass values from the 2nd form to the 3rd the alert scheme doesn't work...to make sure the values from 1 & 2 were getting passed I put in temporary text boxes and the little buggers do show up...the 3rd form is named correctly (SB1) and the alert code is as follows:
function sum(objRef) {
var result = 0;
result += document.SB1.PercentPB1.value - 0;
result += document.SB1.PercentPB2.value - 0;
result += document.SB1.PercentSB1.value - 0;
if (result > 100)
alert("Your total percent allocation exceeds 100%...please check your percent distributions
\nFirst Primary: " + $PercentPB1$ +"%" + "\nSecond Primary: " + $PercentPB2$ +"%");
if (result > 100)
document.SB1.PercentSB1.value="";
}
OK, where did I screw this one up? Help please!
Thanks,
Ron