Bonjour,
voici ma fonction :
function testID(maZone)
{
if(maZone.value==""){alert("Merci de renseigner la zone!");maZone.style.backgroundColor="red";document.getElementById(maZone).focus(); }
}
puis dans le BODY :
<td nowrap style="padding-left:1px;padding-right:1px;"><input type=text onkeypress="this.style.backgroundColor='white';" name=code id=code style="width:100px;" maxlength=13 onblur="testID(code);">
</td>
<td nowrap style="padding-left:1px;padding-right:1px;"><input type=text onkeypress="this.style.backgroundColor='white';" name=date value="<?echo date("d-m-Y");?>" onblur="testID(date);" id=date style="width:90px;" maxlength=13 datepicker="true" datepicker_format="DD-MM-YYYY">
</td>
Voilà mon Pb :
je suis dans la zone 'code", je ne saisi rien et j'utilise la touche TAB.
le ONBLUR se déclenche. la fonction est jouée mais le focus ne revient pas sur la zone "code" mais sur la zone de destination de la touche TAB.
idem si utilisation de la souris pour cliquer sur un autre input à la place de TAB...
Merci pour votre aide.
Configuration: Windows XP
Firefox 2.0.0.16