Input text and button issue

Hello everyone

I have some lines and each line is made of some material (like Gold), I have design an input text and button, the input text get the number and when click on AU it should demonstrated the line which has AU number over input text number. I try to this but I couldn’t solve it.
this is my PG:


Based on your sample, once you got the inputAU, you need to go trhough the list of lines, and change the color of the one representing that AU

So far just setting inputAU to the value will do nothing.

1 Like

should I go through the list of lines in my button? should I put it in input._text?
and another problem is when I click the button I get the previews input text.

Wait this is not babylonjs related :slight_smile: This is basic Javascript questions

You need to add code in the button click event to do what you want with the line which was selected

You should save each tube in an array, then go through the list of tubes to find the one with the entered AU and then change the material color for instance

But again, you may first want to understand how events work in JS

I did the change for you:

1 Like

Thank you so much I really appreciate your help.
I’m trying to learn both of them from last month.