Hello,
How do we multiply 2 field values into one field in one form using javascript. I used this script, but it did not work.
[SIZE=12px]function sc_totalharga_onclick() [/SIZE]
[SIZE=12px]{ [/SIZE]
[SIZE=12px]var jumlah = document.getElementById(‘jumlah’).value;[/SIZE]
[SIZE=12px]var harga = document.getElementById(‘harga’).value;[/SIZE]
[SIZE=12px]var sum = parseInt(jumlah) + parseInt(harga);[/SIZE]
[SIZE=12px]document.write(sum);[/SIZE]
[SIZE=12px]}[/SIZE]
Thank you