Link to home
Start Free TrialLog in
Avatar of jellydeal
jellydeal

asked on

JavaScript/jquery function needed from existing code

Hello :)
I'm  pulling my hair out with this one ;)
I am trying to create a JavaScript/jquery function that will return a calculated value based on parameters passed.

There is a site here : http://bikecalculator.com that does exactly what I need. It's written in JavaScript and the source is viewable. I need a function where I can pass the parameters that the screen asks for and it returns the POWER WATTS.

Does anyone know of an existing function that does this or can someone build one from the example site?

My gratitude will take the form of 500 points and a PayPal donation :)

Thanks in advance
Avatar of Mrunal
Mrunal
Flag of India image

Hi,
if you can find existing JavaScript function with developer toolbar of by saving same html page.

if you look into this, you will find that from all controls (textboxes, dropdownlist)

following function is get called:

update(calcID)
and
updateDistance(calcID,1)
Avatar of jellydeal
jellydeal

ASKER

Hi,
Thanks I did do this and tried to Create a function myself using the existing code but it wouldn't work. I need a function to get called hundreds of times and the GUI slider thing on that page stalls the whole thing. I ideally just want a function .. I failed myself :(
Hi, can you share your code, till now what you have done.

for dragging functionality, use this:

http://skidding.github.io/dragdealer/
Hi sure ;
http://www.countrycorks.co.uk/bike/calc.htm
It processes a file, test.gpx and after pressing process, and waiting it reads in some data. Populates the form fields ,calls the update() but the watts all come out at 150. I got to the point of thining maybe it's best to reinvent the wheel on this occasion!
ASKER CERTIFIED SOLUTION
Avatar of Brijesh Gandhi
Brijesh Gandhi
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial