3
Good morning
Personal was given me a task that is being challenging. I need to develop a textarea
when I click the F2 key inside the textarea
, a list of system logins appears.
Something similar was seen on Whatsapp, when you send a message to a group you put @ and list your contacts to mark the same in the message.
Would anyone know how to inform how I do textarea
occur this?
I thought as follows (I don’t know if it would be the right way):
<!-- language: lang-html -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
<label for="Comentario"> Comentário </label>
<div>
<textarea id="ComentarioText" onkeyup="listaUsuario()"
onfocus="this.rows=5" onblur="this.rows=1" rows="1">
</textarea>
</div>
</div>
<script>
function listaUsuario() {
//Quando clicar sobre o F2 à lista de usuários cadastrados
if (event.keyCode == 113) {
window.alert("O código: " + event.keyCode);
}
}
</script>
</body>
<!-- end snippet -->
Until capturing the key I managed to do, now my doubt is how I move up a list of users, based on this action?
I couldn’t find anything that would shed some light, someone could give me a north to follow?
Where is the list of users, and if you are in a BD, which back-end language?
– Vinicius De Jesus
Vinicius currently the list of users is in mysql in the login table where I have loginid and logname, the back-end language that I will use is php.
– Eder Luca