Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HTML with JavaScript code needed Uses an html form (not a prompt box) that will connect to JavaScript through the use of the HTML onclick

HTML with JavaScript code needed

Uses an html form (not a prompt box) that will connect to JavaScript through the use of the HTML onclick event attribute used in the Submit button element in the form.

Create a Web page that will display the name of a movie theatre, the price of an adult ticket, and the price of a child's ticket.

Your Web Page will use a html "form" (not a prompt box) to obtain from the user their name and the number of adult and children tickets needed to purchase.

Your Submit button, in the form, will use the onclick event handler to call a JavaScript function ( the JavaScript function called in this example is named "displayOrder()").

This function will use the input entered in the FORM to determine the total cost of adult tickets, the total cost of children tickets, and the total of the entire purchase (adult cost + children cost).

Your program will display, in a read-only text box (located in the FORM): the user's name, the number of adult and children tickets entered by the user, the total cost for the adult tickets, the total cost for the children tickets, and the total final cost (adult cost + children cost)

(the displayOrder function is defined within the head tags of the web page- it is called into use when the Submit button is clicked and the onclick event handler activated).

These last 3 numbers should be displayed with a $ and 2 decimal places (use the toFixed(2) function)

Save the file as TicketSales.html. Submit only the actual HTML and JavaScript code in the html file

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

Students also viewed these Databases questions

Question

=+herself to in terms of equity with regard to this assignment?

Answered: 1 week ago

Question

=+ What typical employee will the IA compare him/

Answered: 1 week ago

Question

=+7 What is the overall cost of the international assignment?

Answered: 1 week ago