Question: I need my code modified to make submit button work. I seem to have some small syntax issue such as missing brackets and/or comma(something small).

I need my code modified to make submit button work. I seem to have some small syntax issue such as missing brackets and/or comma(something small). I can not get my submit bi=utton to display total as the pic below shows

Instructions:

I need my code modified to make submit button work. I seem

to have some small syntax issue such as missing brackets and/or comma(something

//my code

3. Within the script section you created in the previous step, enter the following function 1 function to add values of selected check boxes and display total 3 unction calcTotal Within the function braces, define the following global variables: var temTota1 = 0; var items = document.getElementsByTagName("input"); 5. Below the global variables, enter the following for statement: 1 for (var i 0 i5: i++) 2 1f (icemsti].checked) itemTotal (itemsti].value 1) items[i].value is multiplied by 1 to ensure that it is treated as a number Noterather than a string. 6. Below the closing for the for statement, enter the following statement to write the result to the web document: document.getElementByid(" total") .innerHTM Your order total is "+itemTotal+.00 7. Below the closing for the function, enter the following code to create an event listener that's compatible with older versions of Internet Explorer: // add backward compatible event listener to Submit button var submitButton document.getElementById("-Button"); if (submitButton.addEventlistener) submitButton.addEventListener"click", calcTotal, false)i l else if (submitButton.attachEvent) submitButton.attachEvent ("onclick", calcTotal) Save your work, open index.htm in a browser, check the Fried chicken and Side salad check boxes, and then click Submit. The text "Your order total is s14.00" should be displayed on the right side of the page as shown in Figure 3-23. 8. Hands-on Project 3-1 Lunch selections Fried chicken ($8.00) Fried halibut ($10.00) Hamburger ($8.00) Your order total is $14.00 order tota -Grilled salmon ($13.00) Side salad ($6.00) Figure 3-23: Web page displaying order total for selected items

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!