Question: The question I have is about javascript in html. I am trying to do a program that is essentially a Clash of Clans caluclator. I

The question I have is about javascript in html. I am tryingto do a program that is essentially a Clash of Clans caluclator.The question I have is about javascript in html. I am trying to do a program that is essentially a Clash of Clans caluclator. I have to do 'on the fly' calculations for each of the columns of the chart. Everything has to update automatically when the user picks how many of each characters the uesr wants. So if the user picks 5 of something it should know to multipy 5 by however many elixirs it needs to make the character. I have posted the rows and columns that i am using and I have also posted the code for the table that I am using. I know I have to js file that is embedded into the html or something like that in order for everything to work with an onevent sort of object.

Clash Calculator- Enter Max Slots and the numbers of each troop type Character Slots Needed Elixir Needed Dark Elixir Needed Numb 10000 100 500 10000 32000 500 33000 R2 - Do the calculation on the fly: When the user enters a number automatically update the Total Elixir, Total Dark and Total slots they selected. For example, if select 5 giants: Total Elixir is 15000 (3000*5) and total slots is 25 (5*5) 10 90 50 b. When user changes 'max slots' automatically update all the totals. Generate an alert if their max Slots is LT the Number of units. 30 c. generate alert if user enters negative max slot:s tal Slotsd. generate alert if they enter more armies than lax Slots otal Dark Max slots' (For example they set max slots to 100 and enter 80 giants) e. generate an alert if user enters a negative

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!