1
I have the following entries in html:
COD_01 VALOR_01
COD_02 VALOR_02
e asim por diante até....
COD_99 VALOR_99
User will feed each COD and VALUE.
I need to create a js to:
1- Somar todos os Valores, por COD.
2- Preciso exibir um alerta caso a soma de algum código ultrapasse de 1000
Example:
COD_01 VALOR_01
201 200,00
COD_02 VALOR_02
202 100,00
COD_03 VALOR_03
201 900,00
As the value of code 201 has passed 1000, then display message:
Atenção! O valor do código 201 passou de R$ 1000,00
Can make use of jquery, no problem.
Put what you have tried and what really your doubt, the homework should be initiated by you
– Marcus Hert da Coregio
Marcus, as I do not use javascript but database, if no one answers me what I will do is the following: an ajax in the event of change in each value input entering in a table of the database and there I handle whatever you need. However I do not want to do this because it is a bazooka to kill an ant. Now, in javascript nothing really came out. I don’t even know what to google.
– Y. Menon