Réponse acceptée !
On va voir si j'ai bien compris...
<html>
<head>
<script>
function checkAndModify(){
if(document.getElementById("inputText1").value != ""){
document.getElementById("inputText2").readOnly = false;
document.getElementById("inputText2").style.backgroundColor = "white";
}
else{
document.getElementById("inputText2").readOnly = true;
document.getElementById("inputText2").style.backgroundColor = "RGB(220,220,220)";
document.getElementById("inputText2").value = "";
}
}
</script>
</head>
<body>
<input id="inputText1" type="text" onKeyup="checkAndModify()"/>
<input id="inputText2" type="text" readonly style="background-color:RGB(220,220,220)"/>
</body>
</html>
The SMURF
the_little_smurf@yahoo.fr
Enjoy the life, don't waste your time in front of your computer