I created a simple script for copying the values of line "EVEN" to line "i" inside a button
var i = event.target.name.charAt(event.target.name.length-1);
this.getField("OPE003."+i+".NOCIVIQUE").value = this.getField("OPE003.EVEN.NOCIVIQUE").value;
this.getField("OPE003."+i+".TYPE.RUE").value = this.getField("OPE003.EVEN.TYPE.RUE").value;
this.getField("OPE003."+i+".RUE").value = this.getField("OPE003.EVEN.RUE").value;
this.getField("OPE003."+i+".APP").value = this.getField("OPE003.EVEN.APP").value;
this.getField("OPE003."+i+".ARRONDISSEMENT").value = this.getField("OPE003.EVEN.ARR").value;
this.getField("OPE003."+i+".CP").value = this.getField("OPE003.EVEN.CP").value;
the strange behavior is that instead of copying all the values at the same time, it copies only the first field. if I press again, it copies the second one, on so on.
I tryied my button in an earlier version of the same document and it works great. Now I think the only difference between the earlier and new version is I introduced a bunch of keystroke and validation scripts testing regular expressions when entering data in some fields that are not even those listed above. There is no error in the console window and every value is transfered one after the other if I press the button 6 times.
What line of code have I possibly introduced that can stop such a simple button from working?