Failure to write to numeric or text fields.

Previous topic - Next topic

Windsurfer

I am creating an income and expenses form. I need to add two numeric subtotal fields and subtract a third subtotal field, showing the answer in a fourth field. Using the built-in summing and formatting for the added subtotal fields works perfectly.

The following is the function that I call from each field where data is entered:
function FinalTotal()
{
this.GetElementById("FinalTotal").value.toFixed(2) = this.GetElementById("SubTotMtgFees").value + this.GetElementById("SubTotIncm").value + this.GetElementById("SubTotExp").value;
}
As well as 'this', I have also tried 'document' and 'Document'. Even to be able to assign a value to a field would be a breakthrough.

Chromium and Okular give the best results, but do not enter anything into the "FinalTotal" field.

Any hints would be welcome. I have spent about a week trying to find a solution. If there is one I would happily add a tutorial or "How to" into the wiki.

i am using LinuxMint 21.2, based on Ubuntu 22.04, Scribus 1.5.8, and tried PDF 1.4, 1.5 and 1.6.

Windsurfer

I discovered that using the built-in Sum function gave me what I needed, provided user's were told that they had to place a minus sign at the beginning of the value.