Thank you Essential and Drew for your suggestions.
I have a couple more questions for both of you.
Drew,
Thanks again!
I understand that your coding below would return a value of T/F on the checkbox:
document.FromName.checkBoxName.checked
What I'd like to figure out still is the following:
1) checkbox returns value of T/F
2) checkbox triggers an event as follows
• if True: return product (a*b) into TotalField
• if False: delete contents of TotalField
I've been able to reset contents of TotalField to 0.00 but when I attempt to return the product (a*b) to TotalField, it remains 0.00.
This code currently activates the "No" Checkbox and sets the TotalField to 0.00
var CollectionTotal = this.getField("CollectionTotal")
function resetField(name,value)
{
CollectionTotal.value = value;}
if (event.target.value == "No")
{
CollectionTotal.hidden = true
&& resetField('CollectionTotal','0.00')
}
else {
CollectionTotal.hidden = false
}
This code fails to return the product (a*b) into the TotalField when the "Yes" checkbox is True:
var CollectionTotal = this.getField("CollectionTotal")
function product(a,b)
{
return a*b;
}
if (event.target.value == "Yes")
{
CollectionTotal.hidden = false
&& document.write(product("CollectRate*NumPosters"))
}
else {
CollectionTotal.hidden = true
}
Essential,
Thanks so much for your generous consideration! However, at this point, the code you've included, appears to have the same issue I've been facing, namely the value generated by the calculation continues to appear in the total field whether or not the Field Value is hidden. Because I need to add up the selected totals of my client, this behavior results in an incorrect total.
Any further thoughts??
Thanks much for all your time!!
Best,
TrinityAvatar