Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi there, I currently have a simple HTML form, a menu, that would calculate the total cost of the purchase. Such as 3x Single shot

Hi there,

I currently have a simple HTML form, a menu, that would calculate the total cost of the purchase. Such as 3x Single shot of black coffee with 2x double shot esspresso. Total cost of this would be that. Using , thats where I display my total cost. However, with the integration of PHP for data collection purposes, I can only seem to POST values, not values.

Following is my code

image text in transcribed

image text in transcribed

image text in transcribed

What I see

image text in transcribed

image text in transcribed

I really appreciate if someoene could help me out

function totalPrice() var totalprice = 0: var price-of-java 0; var price_of_cafe 0; var price-of-cappu = 0; price-of-java-justJavaCost(); price_of_cafe cafeCost(); price-of-cappu = cappucost(); - total_Price -price_of_cafe + price_of_java + price_of_cappu; if (total_Price> 0) total_Price-"$"+total_Price; document.getElementById ("totalltemPrice").innerHTML = total-Price; else total_Price 0; document.getElementById("totalItemPrice").innerHTML"$0" function totalPrice() var totalprice = 0: var price-of-java 0; var price_of_cafe 0; var price-of-cappu = 0; price-of-java-justJavaCost(); price_of_cafe cafeCost(); price-of-cappu = cappucost(); - total_Price -price_of_cafe + price_of_java + price_of_cappu; if (total_Price> 0) total_Price-"$"+total_Price; document.getElementById ("totalltemPrice").innerHTML = total-Price; else total_Price 0; document.getElementById("totalItemPrice").innerHTML"$0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

Understand why empowerment is so important in many frontline jobs.

Answered: 1 week ago