How to call JS code

Hi
I have created a form
The purpose of the form is that will calculate the total price according the values selected.
I have managed to make the form in sublime editor.
Not sure how to use the code on wix

Followed the tutorial created a database built my form connected to the database.
Form works just needs the function to calculate the values

How to I use my working javascript code in wix
In my current code I built the function by referring to the ID name that is in the html
I should replace the ID names to the ones on the wix site or how I connect my JS code with the form on wix website
Thank you

Hi,
What calculation are you trying to do? check out the documentation and the code examples to see how to get element’s properties.

Here is a very simple example that demonstrates calculations based on user input: Attendance Fees

I would suggest visiting the following sites for information on programming in Wix Code and Javascript:

Thank you for your reply.
I am a playing around with javascript,have worked with it before but in hand coded pages.
I found it difficult to use it in a wix site-not sure what is actually confusing me.

I created a form with html css and js that calculates the price for the accommodation according the choices the customer makes-just 4 choices-
Now the form works fine in the browser

I created a database in wix,would like to use my js code in wix,to connect it with the database and to make the form to work on wix.

In my code I connected the html with the js with id and classes

In wix code how to I replace my html ID to the one on wix?

Not sure if this makes much sense

Thank you.
I am familiar with javascript just not sure yet how to make it work in wix the code itself.
Will check the link posted

I know everyone is trying to help, but there is nothing more frustrating than getting an answer that is not related to your question. The question is simple. We already know how to code in Javascript. We just want to know how to call that code from our Wix page. If anyone knows, then please answer, otherwise please do not give us tutorials in Javascript.

This thread is old and being closed. If you have a new code question please start a new post and include any relevant code snippets so that community members may attempt to help you problem solve.