Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(b) The following HTML form allows a user to supply details for purchase of tickets for a concert. (Some of the options from the

(b) The following HTML form allows a user to supply details for purchase of tickets for a concert. (Some of

(b) The following HTML form allows a user to supply details for purchase of tickets for a concert. (Some of the options from the select element have been omitted). When the submit button is clicked a JavaScript function called validate is invoked to check that the name fields contain data, the card number satisfies a CRC check and that the number of tickets is an integer in the range 1 to 10. Name Card number Performance 2.30pm Aug 17 7.30pm Aug 17 Number of tickets (i) Write a JavaScript function called validate that will perform the validation described above; it should display an appropriate alert if any input is invalid. You may assume a function to do the CRC check has already been written. (ii) Explain why it is desirable to perform both client-side and server-side validation of form data such as in the example above.

Step by Step Solution

3.48 Rating (164 Votes )

There are 3 Steps involved in it

Step: 1

i Here is a JavaScript function called validate that performs the validation described function vali... 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

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students also viewed these Programming questions

Question

As a general guideline, when should present value analysis be used?

Answered: 1 week ago