1
Guys... how can I make a system in which the input text
gets a name from function
.. then he searches his name internally with the name that is on string
.
guy...
In HTML I do the following:
<input type="text" id="seuInput" onkeyup="keyupFunction()">
In javascript:
function keyupFunction() {
// codigo para achar o nome em certa função
var valor_do_campo_aqui = document.getElementById("seuinput").value;
}
For example:
I have the function carro() { ... }
this "car" is the name of a certain function. And I need to open it to call certain data on it.
The question refers to something almost, I repeat almost like this - Checking if value exists in an array via search field
For example, I hope to receive only one alert
- whether it exists or not.
How can I use a search to find this and other functions I can create later!?
is something like this? > https://codepen.io/alexlupoz/pen/ELpevJ
– Alex Lupóz
I will elaborate one with HTML Inner and put as an answer, for posteriority that also end up finding your post by chance and want to remedy such doubts. A moment.
– Alex Lupóz
Although the answers you have are good and answer what you asked, they are hardly what you want to do. If you show how and where you will use them, it will be easier to advise an alternative.
– Isac
But how do these researches differ ? Aren’t all researches generalizable to use a single function ? This is something that with the little context given in the question is not possible to answer
– Isac
@Isac Well, if I were going to post a lot of code or say a little bit of detail, I would certainly get a Dowvote because it wouldn’t be the focus of the context and the ethics of the site. Here on pt.stackoverflow.com aims to elaborate question in isolation for each one of which is the problem, which in my case was that of the issue. I couldn’t say too many lines and/or post too many chunky codes for the question. Maybe someone or some user would get confused and would ask questions in the commissaries asking for more information. So I just posted and asked in isolation what I couldn’t do.
– Diego Henrique
Yes I understand and I agree that doing so on this issue would distort it. I’m just trying to warn you that you are most likely in a XY problem and so you should rethink a little bit the way you’re trying to solve the problem.
– Isac