Putting a Calculator in a Web Page
Discussion
Does any one know how to add a Calculator into a web page. I need to add a function so a customer puts the size of their garden in cell and it gives them a figure that is multiplied by a fixed number.
It actually needs to multiply A x B x C (C is a fixed number) = Total
Thanks in advance
Dave
It actually needs to multiply A x B x C (C is a fixed number) = Total
Thanks in advance
Dave
The easiest solution is to use javascript. The best solution is to use a server-side script to process the data. Depending on what platform your server is you'd need to figure out what language to write that in. For most platforms though, perl is available and quick to use for such an application.
Ciao
Zak
Ciao
Zak
docevi1 said:
like this?
the code is here
![]()
edit:: for the constant value, it'd be easy enough to change c to be a hidden field within the form, or ignore the c field altogether and simply multiply by a given number in the function.
>> Edited by docevi1 on Tuesday 12th April 18:27
Stefan
All I get when I click your link is the calculation, not the code
Dave
406 said:
How do I hide value c so it does not show?
I am hopeless at this sort of stuff, born too early![]()
change < input type="number" size=4 value=20 name="c" >
to < input type="hidden" value=?? name="c" >
where ?? is the value of your constant.
(remove the spaces after < and before the >, I've only added them so you can see the code on PH)
FunkyGibbon said:
406 said:
How do I hide value c so it does not show?
I am hopeless at this sort of stuff, born too early![]()
change < input type="number" size=4 value=20 name="c" >
to < input type="hidden" value=?? name="c" >
where ?? is the value of your constant.
(remove the spaces after < and before the >, I've only added them so you can see the code on PH)
Thanks for that, I will give it a try
Dave
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff



