Hello,
Wie aber mach ich das im obigen Beispiel? Ich weiss zwar den nun ausgewählten Wert/Index, aber ich muss ja auch wissen, welchen Zähler ich dekrementieren muss, also brauche ich den Wert(Index VOR onchange().
- den alten Wert hält dir (meines Wissens) kein Browser vor.
- damit bleiben zwei Möglichkeiten:
a) rechne alle Zähler neu aus
b) lege den alten Wert noch irgendwo ab solange du ihn noch brauchst, beispielsweise eine Variable oder ein hidden-Feld.
MfG
Rouven
--
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has! -- Team Member on Jacques Villeneuve