Jump to content

Price form Calculator


Recommended Posts

Hi everybody, Im new to javascript and need some help building a price calculator.

 

Im looking to build something similiar to this http://psdtowp.com/order-now only I've no idea where to start.

 

From applying my own thoughts I was going to set a list of undefined variables which are populated from input fields on keyup, The total would then be calculated on the submit button as I've no idea how to do it on the fly and already im getting stressed out  :o.

 

My current JS is

/////////////////////////////////////////////////////////////////////

// Variables

// Content/SLA
var ContentMinutes = '';
var ContentMinutesSelector; // Switch Case
var ServiceLevel = 5;  //This is set as a test, it will actually get a value from input
var NoOfFrames = '';

// Render Time (Hairier the Better)
var AvgFrameRenderTime = '';
var AvgFrameRenderTimeSelector; // Switch Case
var CoresInTest = '';

// Other
var EstimatedCoreHours = 10; //This is set as a test, it will actually get a value from input

// Cost Estimate
var CostEstimate = ServiceLevel * EstimatedCoreHours;


/////////////////////////////////////////////////////////////////////

//  Functions

function CalculateEstimate() {	
parseInt(document.getElementById("PriceEstimate").innerHTML=CostEstimate.toFixed(2));
}

Link to comment
https://forums.phpfreaks.com/topic/237259-price-form-calculator/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.