I need to add a feature to my website that will fetch a price when a customer enters a number into the green "Miles" input box and clicks the blue "Get Price" button. On clicking this button the code will use the number entered into the input box to calculate a price using a formula. The price then needs to be displayed to the right of the blue button....
Unfortunately, the formula to work out the price is quite complicated. I know how the formula looks in excel but I have absolutely no experience in JS at all! Basically, for anything up to and including 50 miles, the price is £50, then, for every mile thereafter, 50p is added. In excel the formula looks like this:
Any assistance would be greatly appreciated. I really do know bugger all about JS!... the only thing I've managed to figure out so far is that the code needs to go here: