So,I want to create a program,which can show me something,if I enter something (with the help of a datalist).
Because I don´t want to code for every possibility,I want to ask,if you can say,that the value of the Textbox should show the text inside of the variable with the name of the textbox.
One example :
There it would be nice,to be able to say : the variable with the name
of document.getElementById("boxP").value
should be shown(in this case : success)
<input type="text" name="srch" id="boxP" list="datalist1""></input>
<datalist id="datalist1">
<option value="TEST">
<option value="TEST1">
</datalist>
<script>
var TEST = "sucessful"
</script>
I don´t think,that you can do that(/ mark some output as a variable name),but it's worth a try,I think.
I´m happy about every answer!