4
Good Afternoon,
I have both inputs below:
<input type="text" id="txtEntrada" name="entrada" onkeyup="somenteNumeros(this);" >
<input type="text" id="txtSaida" name="saida" onkeyup="somenteNumeros(this);">
I would like that when clicking the input the Output was disabled and vice versa. I’m doing it this way:
<script>
$(document).ready(function(){
$("#txtEntrada").blur(function(){
if ($("#txtEntrada").val() !=''){
$('#txtSaida').attr("disabled", true);
}else{
$('#txtSaida').attr("disabled", false);
}
});
});
</script>
Some with a better suggestion?
Bia, if for example I click initially on
txtEntrada
then thetxtSaida
will be disabled and will not be able to click on it again, is this behavior you expect?– Pedro Camara Junior
The way you’re putting it looks like they’re exclusionary, is that it? If I fill
txtSaida
I can’t fill intxtEntrada
?– StillBuggin
@Pedrocamarajunior this is my dilemma, I wish it were possible yes click on txtSaida again.
– Bia
Yes @Eduardoalmeida
– Bia