First of all, thanks for replying.
I know I posted PHP and HTML code, but it was neccesary for you to understand what I'm looking for.
As I said before the first text box belongs to a 'for' cycle, like this:
So it doesn't make a certain quantity of boxes, that could be the problem but I don't know much about javascript.
I tried what you told me, wirehopper, but it doesn't seem to work alright, maybe because what I just said, hope you or someone else can help me out.
Thanks in advance.
EDIT: I tried to make a function in JavaScript, something like this:
But in the textbox where it should show the amount left, it just shows the value of '$monto' and it doesn't substract, doesn't matter what I write in the boxes that belong to the 'for' cycle.
Hope it's easier for you to help me with this function.
Greetings.