mads
|
posted on 10/5/11 at 11:41 AM |
|
|
can anyone write a javascript file with calculations in it for me?
Hey up all,
I am doing a project at work and need to create an online calculator which will allow users to work out the answer based on the values they input. I
can do the asp.net page itself but then need a javascript file which will do the calculating. This is where the problem lies... I do not know java. Is
there any kind person who can write the js file for me so I can include it in my .asp page?
Cheers,
mads
We gain knowledge faster than we do wisdom!
Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in
sideways, thoroughly used, totally worn out and loudly proclaiming... "f*ck, what a trip!"
|
|
|
HowardB
|
posted on 10/5/11 at 11:51 AM |
|
|
I seem to recall that there is a facility called the "cafe" or something similar which a huge free library of java beans (applets) perhaps
there is something in there that might be borrowed and modded?
hth
Howard
Fisher Fury was 2000 Zetec - now a 1600 (it Lives again and goes zoom)
|
|
dan__wright
|
posted on 10/5/11 at 11:55 AM |
|
|
why the need for the JS if your using ASP.Net? submit a form with the values and do the calcs in asp.net
FREE THE ROADSTER ONE…!!
|
|
mads
|
posted on 10/5/11 at 11:58 AM |
|
|
i'm new to asp.net so still learning the basics of it so wouldnt know how to write the calculation in it.
btw Dan - did you get my U2U re: carriers/flanges?
We gain knowledge faster than we do wisdom!
Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in
sideways, thoroughly used, totally worn out and loudly proclaiming... "f*ck, what a trip!"
|
|
Pdlewis
|
posted on 10/5/11 at 12:03 PM |
|
|
Hi,
Do you need to access the values server side or are they just for the client?
If you need them server side it would be easier to do the calc on the server (are you using c# or vb?)
if you want the user experience of the client side you can put the result in a hidden field so it is accessable on the server side.
This is a Jquery calculator plugin which will make life easier
Plugin
Any questions give me a shout
Build Photo Album
Updated 05/02/2009
|
|
dan__wright
|
posted on 10/5/11 at 12:11 PM |
|
|
look up form handling, you can pass the values from the form to an asp page and calc server side in asp.net
[Edited on 10/5/11 by dan__wright]
FREE THE ROADSTER ONE…!!
|
|
mads
|
posted on 10/5/11 at 12:21 PM |
|
|
quote: Originally posted by Pdlewis
Hi,
Do you need to access the values server side or are they just for the client?
If you need them server side it would be easier to do the calc on the server (are you using c# or vb?)
if you want the user experience of the client side you can put the result in a hidden field so it is accessable on the server side.
This is a Jquery calculator plugin which will make life easier
Plugin
Any questions give me a shout
The values are for the client only. Form contains 5 values the user inputs, and answer output to the screen.
I am using VB.
Thanks for the link. Will have a read
We gain knowledge faster than we do wisdom!
Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in
sideways, thoroughly used, totally worn out and loudly proclaiming... "f*ck, what a trip!"
|
|
blakep82
|
posted on 10/5/11 at 01:33 PM |
|
|
what sort of calculation? or is that a secret?
surely if its just a case of entering 5 values and get an answer, even something like a excel spread sheet should do it for you?
obviously not a online calculator, but would do the same job?
________________________
IVA manual link http://www.businesslink.gov.uk/bdotg/action/detail?type=RESOURCES&itemId=1081997083
don't write OT on a new thread title, you're creating the topic, everything you write is very much ON topic!
|
|
scudderfish
|
posted on 10/5/11 at 01:45 PM |
|
|
BTW, Javascript is completely unrelated to Java....
How complex is the calculation? What's the formula given the 5 variables?
Regards,
Dave
(Posting when I should be coding in Java & Javascript )
|
|
mads
|
posted on 10/5/11 at 02:03 PM |
|
|
equations are not secret... here are the details:
User inputs following:
Height - in feet and inches (separately)
Weight - in kilograms
Age
Creatinine - micromoles/L
Sex
The outputs I then need from this are:
Ideal Body Weight (IBW) - worked out using...
Men (IBW): 50kg + (2.3kg x number of inches over 5foot)
Women (IBW): 45kg + (2.3kg x number of inches over 5foot)
For patient’s < 5foot, use IBW = 45kg (women) or 50kg (men)
Creatinine clearance (CrCl) - worked out using..
CrCl (male) =
([140-age] * IBW * 1.23) / (creatinine)
CrCl (female) =
([140-age] * IBW * 1.04) / (creatinine)
Dose = 5 * IBW
The dose needs to be rounded to the nearest factor of 40.
We gain knowledge faster than we do wisdom!
Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in
sideways, thoroughly used, totally worn out and loudly proclaiming... "f*ck, what a trip!"
|
|
scudderfish
|
posted on 10/5/11 at 02:35 PM |
|
|
u2u me your email address, I've written it for you
|
|