Question
I am working on hands on project 7-4 in Javascript 6th edition, Pizza order form. I have to create an external js file with the
I am working on hands on project 7-4 in Javascript 6th edition, Pizza order form. I have to create an external js file with the following: Global variable: deliverInfo (an empty object), delivSummary (points to element with ed value deliverTo). Create a function: processDeliveryInfo() this funtion add input field to the delivInfo object as a property value. Declare local variable named prop. Add statements that store the value of the nameinput field in the name property of the delivInfo object, the addrinput field in the addremail property and the phoneinput filed in the phone property. in the processDeliveryInfo() function add a for/in statement using the condition (prop in delivInfo) and the loop should contain this statement delivSummary.innerHtml += "
" + delivInfo[prop] + "
"; This statement adds value of current prpoerty to content of the deiverTo element. Add a function named previewOrder() that has two statements: a funtion call to processDeliveryInfo() and astamenet that changes the display style of the section element to block. Add a function to create an even listener on the element with the id value previewBtn. The click eventshould call the previewOrder() function. Add statements to run the function that creates the eventlistner when the page finishes loading.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started