Past-paper question · 2021 May-June · Paper 12 · Q5(f)

Question 5(f) 2021 · May-June · Paper 12 · 4 marks

Original past-paper question for 5(F)
Original past-paper question for 5(F)
Original past-paper question for 5(F)
Original past-paper question for 5(F)
Reveal official mark-scheme answer Official mark-scheme answer for 5(F)

Official answer for Question 5

Part (f)

Question 1

mark for each correct letter/statement in each space

Question 4

Question 1

✓
Bochen completes the online booking form and clicks ‘Submit’.

Question 2

✓
F // JavaScript is executed on the client's web browser to
✓
validate the form data.

Question 3

✓
Any errors found are flagged, and step 1 is repeated.

Question 4

✓
D // The form data is transmitted to Cambridge International
✓
Holidays' webserver.

Question 5

✓
PHP code is executed to perform extra data validation checks on
✓
the form data.

Question 6

✓
A // Any errors found at the server side are flagged and step
✓
1 is repeated.

Question 7

✓
The booking details are added to the database.

Question 8

✓
C // PHP is executed to generate a confirmation (HTML) web
✓
page that is returned to the client's web browser.
✓
Question
✓
Answer
✓
Marks

Mark scheme 9608_s21_ms_12.pdf →

Show text version of question

Question 5

Part (f)

Question 5

A web page includes HTML and JavaScript code.

01 <html> 02 <body> 03 04 Calculate area of a triangle: 05 <form name = "Triangle"> 06 <p>Base <input type = "number" name = "B" value = ""></p> 07 <p>Height <input type = "number" name = "H" value = ""></p> 08 <button onclick = "area()">Calculate</button> 09 </form>

Question 10

11 <script> 12 function area() { 13 var base = document.forms["Triangle"]["B"].value; 14 var height = document.forms["Triangle"]["H"].value; 15 if (base == "" || height == "") { 16 alert("Both values must be entered"); 17 return false; 18 } 19 else { 20 area = 0.5 * height * base; 21 alert("The area is: " + area); 22 } 23 } 24 </script> 25 </body> 26 </html>

Part (f)

Bochen visits the Cambridge International Holidays website to book a holiday.

The sequence (1 to 8) below describes the steps that take place when he submits a booking.

Four of the statements A, B, C, D, E and F are used to complete the sequence.

A
Any errors found at the server side are flagged, and step 1 is repeated.
B
HTML code is used on the client’s web browser to validate the form data.

PHP code is executed to generate a confirmation (HTML) web page that is returned to C the client’s web browser.

D
The form data is transmitted to Cambridge International Holidays’ web server.

JavaScript code is executed to generate a confirmation (HTML) web page that is E returned to the client’s web browser. F JavaScript code is executed on the client’s web browser to validate the form data.

Write one of the letters (A, B, C, D, E or F) in the appropriate row to complete the sequence.

1 Bochen completes the online booking and clicks ‘Submit’.

2 .........................

3 Any errors found are flagged, and step 1 is repeated.

4 .........................

5 PHP code is executed to perform extra data validation checks on the form data.

6 .........................

7 The booking details are added to the database.

8 .........................

[4]

Question 13

Topic relevance

Why this question appears here

71% assigned-topic match · Hardware › Logic gates and logic circuits

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9608_s21_qp_12.pdf

Keep practising this topic