Hi
I have three editboxes, the third of which is a calculation of the inputted values of 1 & 2
That part works fine, however i want the result to be rounded up to a whole number as currently the decimal places run to infinite
Javscript does this using the script Math.round(x)
I have set a chnage event for Editbox 3 to run that Javascript, but it doesn't
Can anyone help please
Calculation using an editbox
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
Re: Calculation using an editbox
You cannot round the value within an onchange event because updating the value during the event will trigger another onchange event, potentially causing an infinite loop.
You will need to round the value in the calculation itself.
You will need to round the value in the calculation itself.