I'm working on a JavaScript project and I would like to have your help/advices. I have to create an "assistant" to help to create formulas. To explain, I have a button to add a component to the formula (add input
). A component is composed of 3 sub-components (last input doesn't appear in the formula).
I would like to update the formula when something change in the components. For example, I would like to have: 0.1*levenshtein(name) + 0.5*distance(coordinates) + 0.4*levenshtein(website)
.
I have tried some code but I can't have something working. My code is working for inputs when they have constant (predefined) values but doesn't work when user changes values. Instead of having code, I'm looking for advices or how I can implement this problem. If needed I can provide some code (but it can be a little tricky for you who doesn't know better my project)...
Thanks in advance,
Have a good weekend