Hi, does anyone here know where I can get an online interactive calculator for a website, preferably HTML. I need to create a calculator for the amount of time spent sitting per week/month/year.
These sorts of things are really straightforward to calculate in JavaScript, and they have the benefit there of being “live” – calculations update as you type the seed numbers in – if that’s what you want. To get started with this, outline the numbers you want to act on – the fixed things you know, like the number of hours in a week/month/year, and the inputs you will use from the visitor. Write those out in a message here, and I am sure someone can help you make the necessary form field + magic.
If you want to store the result of this calculation, then you have a different set of problems. Do you need to also gather the name of the person? Do you want to keep track over time for each visitor? Those require a much larger set of tools, because you have to have a login or other identifier, and a storage area for the data. More programming there.
Walter
On May 14, 2015, at 9:53 PM, Elizabeth email@hidden wrote:
Hi, does anyone here know where I can get an online interactive calculator for a website, preferably HTML. I need to create a calculator for the amount of time spent sitting per week/month/year.
These sorts of things are really straightforward to calculate in JavaScript, and they have the benefit there of being “live” – calculations update as you type the seed numbers in – if that’s what you want. To get started with this, outline the numbers you want to act on – the fixed things you know, like the number of hours in a week/month/year, and the inputs you will use from the visitor. Write those out in a message here, and I am sure someone can help you make the necessary form field + magic.
If you want to store the result of this calculation, then you have a different set of problems. Do you need to also gather the name of the person? Do you want to keep track over time for each visitor? Those require a much larger set of tools, because you have to have a login or other identifier, and a storage area for the data. More programming there.
Walter
On May 14, 2015, at 9:53 PM, Elizabeth email@hidden wrote:
Hi, does anyone here know where I can get an online interactive calculator for a website, preferably HTML. I need to create a calculator for the amount of time spent sitting per week/month/year.
Then I would ask juststand.org if they would object to you using their script as long as you provide a link to their site and due credit for their work.
I am assuming that the raison d’etre for you doing this is the same as theirs?
Not sure, I would need to discuss with client. Raison d’être is the same. Just wondered where we could get something like this - also may need to alter some Q&A.
Then I would ask juststand.org if they would object to you using their script as long as you provide a link to their site and due credit for their work.
I am assuming that the raison d’etre for you doing this is the same as theirs?
If you want the exact same functionality the code is all there on the juststand.org site but the sensible thing would be to ask rather than rewrite the whole thing from scratch.
There is no reason why you cant style it differently and reword the questions.
An unscrupulous person would just use their Javascript as is - or pretend it was their own.
I am a great believer in reusing code that works but as I said it is a relatively trivial job to just create a series of questions that you have to answer using a picker or form field and to produce a total of all the answers at the bottom of the page.
Where it becomes more tricky is when you have to introduce logic like ‘you sped too much time sitting at the computer - get out more!’ but it is straightforward to display a message when the total is between certain values
So - adding up the total time is the easy part. It is what you want to then do with the information gathered that can start to get more complicated ie analysis and response.
As Walter said in his initial answer - you have to have a clear plan of what you are trying to achieve - and spell it out.
This is an example of a product calculator - the principles are the same ie put in quantities and they are added at the bottom. This one just totals the order value. http://www.deltadesign.co/odds/calculator2.html
Type in quantity of product in the first column (# of hours) the second column gives the # of products multiplied by the product value (not required in your case) and the Total field gives you the Total value of the order (Total# of hours).