I spend hours trying to find the mistake I made, but cannot find it. It is part of a simple accounting thing I m trying to make for the fun of it. What it should do is to add the amount ex vat to the vat amount and put the answer in the next textfield, so it is possible to check by the eye whether the invoice is indeed that amount of money. But, is does not work an I don't know why. Anybody a suggestion? I know I do not validate whether the value is a number or not, but that does not seem to be the problem. I tried the part with another event handler and function which worked. But this part seperatly, nothing.
Looking forward to a reply.
The code is as follows:
Looking forward to any reply
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
var amount_ex = parseFloat(document.getElementById('amount_ex').value) ;
var vat = parseFloat(document.getElementById('vat').value) ;
document.getElementById('total_amount').value= amount_ex + vat;
<form name = "invoice" action="welcome.php" method="post"><br>
Amount ex VAT: <input type="text" id="amount_ex" name="amount_ex" value="" onkeyup=transfer_ex()/><br>
VAT: <input type="text" id="vat" name="vat" value="" onkeyup=transfer_ex()/><br>
Invoice amount: <input type="text" id="total_amount" value="-" /><br>
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread