liamloveslearning Posted May 23, 2011 Share Posted May 23, 2011 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 . 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)); } Quote Link to comment https://forums.phpfreaks.com/topic/237259-price-form-calculator/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.