onkeypress ne fonctionne pas sous IE
salut, j'ai un pb avec l'évènement onkeypress qui fonctionne très bien sous FF mais pas sous IE.
Ci joint mon code :
Code:
<input type="text" style="background-color:#FFFFFF;" name="productId" property="productId" maxlength="8" onkeypress="isReturnEvent(event,'document.forms.VanillaForm.searchType.value=2;document.forms.VanillaForm.submit();')" ></input>
et le code de isReturnEvent:
Code:
1 2 3 4 5
| function isReturnEvent(e,action)
{
var codeChar = (window.Event) ? e.which : e.keyCode;
if(codeChar == 13){eval(action);}
} |
quelqu'un sait d'ou ça pourrai venir ?