2
In a given input
allow the user to put whatever content they want, but by pressing the key +
will open a pop-up
(that is working) with data coming from the database. What I am trying to do now is: When I press the key +
open to pop-up
, and at the same time I give a backspace
in input
to erase this +
pressed into input.
Input:
<input type="text" id="inputIdCliente" class="form-control input-sm" onkeypress = "openSearchCliente(event)"/></td>
Function that opens the pop-up:
function openSearchCliente(e) {
var unicode = e.keyCode ? e.keyCode : e.charCode;
if (unicode == 43) {
popupSearchCliente.Show(); //Abre pop up
//Código para dar backspace na input (em falta)
}
}
What I really need is to give Backspace in input, I’ve already searched some things on the net and I haven’t found a solution that replicates what I want to do...
And if the input already has some value with the character
+
? In your code it would be removed together.– Kazzkiq
I edited my answer with the solution to the case cited.
– abfurlan