Old 11-04-2006, 12:13   #1 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,568
Javascript rate calculator ??

I need something that'll do the following :

price 1 x number of days = 1price
also
price 2 (different rate) x number of days = 2price

it'd be great if i can also use a pop up calendar to fill in the number of days automatically ...

There's millions of scripts out there that works out all sorts of calculations (mortgage, airspeeds, wind resistance etc)- but i can't seem to find something this simple (?) anywhere - on the usual script sites ...

Can anyone help ?
__________________
fuck signatures
  Reply With Quote
Old 11-04-2006, 12:15   #2 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 846
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
Sounds like a normal calculator would do the trick mate. Fisher Price?

Jesting...hehe

I know someone who had someting like this...I'll see if I can get it.
  Reply With Quote
Old 11-04-2006, 12:36   #3 (permalink)
d3mcfadden
Senior Member
 
d3mcfadden's Avatar
 
Join Date: Apr 2005
Location: -
Posts: 694
Send a message via AIM to d3mcfadden
something like this???

Code:
function rateCalc (price, rate, days) { var final_price = Math.round(((price * rate * days))*100)/100; //round to 2 dec return final_price; }
  Reply With Quote
Old 11-04-2006, 14:13   #4 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,568
dunno ? maybe .. ?

Is that all there is to it ? me no speaka da javascript lingo ....
I'll try it out ...

thanks all the same ...

i3lance - that'd be cool if you can find that other thing for me...

lost.
__________________
fuck signatures
  Reply With Quote
Old 11-04-2006, 14:16   #5 (permalink)
d3mcfadden
Senior Member
 
d3mcfadden's Avatar
 
Join Date: Apr 2005
Location: -
Posts: 694
Send a message via AIM to d3mcfadden
guess it would help if I understood what context you are using it in, but yes it would be a simple as something like that... for the most part
  Reply With Quote
Old 11-04-2006, 14:53   #6 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,568
its for an item hire ...

i.e. item1 = £10 per day - input number of days in a form field and hit 'submit' to calculte the total.
item2 -= £12.30 per day - same process - new figures !

something tied in with a pop up calendar would be perfect - select dates and select the item - and calculate !

bingo !!

does that help ?
__________________
fuck signatures
  Reply With Quote
Old 13-04-2006, 11:58   #7 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,568
it now sounds like this client wants :

- to calculate a total cost (with rate conversion above)
- to add additional charges where neccessary
- to forward all that info to a booking form
- to take credit card details via ssl
- to send auto confirmation emails

... so, unless I'm very much mistaken - that sounds like a shopping cart feature is required !!
but only for 2 products ... and this hasn't been budgeted for.

I'm looking at romancart and mals-ecommerce for dead quick, hosted set up - minimal time spent is my requirement.

anyone care to suggest anything ??
(apart from "get a clearer brief next time, knobhead")
__________________
fuck signatures
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8