Dropdown's total

I have 2 dropdowns (#dropDown1 and #dropDown2). What I need is when either of the dropdown is selected it will displace the value in a text box (ID #textTotal )

If both dropdowns are selected then a total value will displace in the text box.
I hereby attached a picture for what I need. Thank you.

I see that this is the second time that you have posted this question. In the first post , Sapir provided excellent coding assistance, however you admit that you have no coding experience.

We appreciate your interest in really getting the most out of Wix Code and how much you want to learn. You will need to familiarize yourself with basic coding concepts to accomplish what you want. There are a wealth of Javascript coding sites which will help you learn Javascript from basic to advanced - Javascript.info is a good one. The Wix Code Resources provides tutorials, examples, and articles on getting the most out of Wix Code. We are happy to get you pointed in the right direction, but you’ll need to take it from there. As questions or difficulties arise, we are here to help.

You may also want to check out the WixArena - it’s a hub where you can look for Wix Code (and other) experts for hire.

Thanks for your understanding.

I wrote back because her code doesn’t work. If I can understand code just by reading then I don’t need to come here for help. How ever your company advertised as no code needed web-editor?

A Wix site can be built without code. Adding Wix Code to a site adds capabilities which can’t always be achieved just by using components on the page.

Sapir’s code does in fact work. However, in order to use it, you need a basic understanding of Javascript and Wix Code.

BTW is there any forum provide help outside Wix?

You can check the following:

Hello HLaw,

I have a tutorial article that shows how to perform basic math functions. You can check it out here:

https://support.totallycodable.com/en/article/create-simple-math-calculations-instant-online-quote

If you still need help after that, I recommend you find someone that can either teach you privately or do it for you. People I recommend are here: www.totallycodable.com/featured-coders

Or you can start from the beginning and learn the Wix Code basics here: https://www.youtube.com/playlist?list=PL16sLBOBeiCOXrwWr-qnSsnuK8yHAiFFZ

I, too, come from a non-coding background. It took a lot of questions and practice to break through little by little. It didn’t happen overnight. Persistance and patience is the key.

Good luck and happy coding :slight_smile:

I am a beginner, I agreed I have to learn coding, without these basic knowledge it’s impossible for the tech support to provide help.

But I 've managed to get some WIx’s code to work. Example are backend and preloader’s codes. I got the backend’s tutorial from YouTube and it works! it’s complicated. The person who give tutorial also a non-code writer but a very good teacher instead.

FYI, I was selected as a webmaster among 400 members because most us knows very little about web design. Apart from that, my non-profit organization has a limited budget for a professional webmaster. For 2 years I’ve refused to volunteer as a webmaster due to my lack of knowledge in coding until recently our current webmaster resigned.

One of the director approached and reassured me with Wix’s 100% non-code web editor. If that is true, then I will have no excuse but to help as much as I can. According to the forum I have posted, it turn out this is not true as you and your team tech supports described.

But then I realized if I have to spend times learning these codes and possibility end up hiring a code expert,
would it be more appropriate for my organization to hire a professional webmaster instead?
If is more economical to have professional webmaster then our organization might not need Wix anymore.

I will forward all our post to director attentions and let them decide.
Thank you

Sounds like they are trying to do shortcuts. Just because Wix is easy to manage does not make anyone an instant web designer especially if they are trying to create something custom instead of using a premade template Wix provides.

Sometimes you cannot shortcut your way trying to save hundreds or thousands of dollars. If you want something done right, then you hire experienced people to do it. It doesnt matter if it is on Wix or something else.

I dont spend time convincing people to use Wix. I only work and train people that have made up their mind …and so far I have 100% satisfied clients because of that. I create solutions for those who dont have time to figure out the solutions on their own.

I recommend your organization either commit their time to learn how to do it themselves OR commit their time to save more money for someone experienced to do it for them. Either way … time is their answer.

There are millions of Wix web sites out there in the world that were built and designed without Wix Code. The Wix site editor provides an environment for building a rich and compelling web site without the need for code. In addition, there are also Wix Apps that provide advanced capabilities for eComm, scheduling and more.

Wix Code is a relatively new feature for Wix sites and provides the web site designer/builder with the added capability of adding custom advanced features based on specific requirements and needs. Wix Code requires a knowledge of programming fundamentals. However, many users have “graduated” from Wix Web site design to Wix Code programming by taking advantage of the Wix Code Resources . Maybe I’m not being fair by saying “graduated” to programming - I’m a developer/programmer, but a really poor designer. I would love to be able to “graduate” to web site design , but I’ll just live with my limitations.

To help you get jump started, I’ve cobbled together a quick example for you. The site has two pages with two different methods, of doing what you are trying to do. However, you should realize that there are countless ways to achieve the results.

Here is a very simple example of an “attendance fees” site:

I hope this helps, and that you eventually discover for yourself the full power and simplicity of Wix Code.

Yes! I can understand the code from Code Queen Nayeli and Yisrael and both works! But there was a orange question mark for “missing radix parameter” in 2nd line

function calculate() {
var charge = parseInt($w(“#dropdown1”).value) + parseInt($w(“#dropdown2”).value);
return charge;

don’t know what it is but works anyway.

Thanks a lot and happy new year.

The parseInt() function allows an optional parameter to specify what numeral system (decimal, hexadecimal, octal, etc) you want to use when parsing the number. Since it’s an optional parameter, you got an orange (yellow?) warning instead of a red error indicator.

I’m really happy you were able to figure this out. Just stick with it and with some patience, and help from Nayeli, Wix, and the other denizens of the Wix Code forum, you will eventually achieve stunning results.