Question 6(c)(v) 2017 · May-June · Paper 12 · 4 marks
Question 6
Part (c)
(v)
Question 6
Downloading a file from a website is an example of a client-server application.
The following web page used for data capture consists of:
- two text boxes for the entry of:
- a button that the user clicks to submit this runner’s result.
° a race runner’s ID code ° their finishing position in a race.
1 <html> 2 <head> 3 <title>Untitled Document</title> 4 <script language="JavaScript">
Question 5
6 function myButton_onmousedown() 7 { 8 var Output1 = "Runner ID OK"; 9 var Output2 = "ERROR – entry refused";
Question 10
11 var Runner ID = document.forms["form1"]["txtRunnerID"].value; 12 // || in Javascript is the 'OR' operator 13 if (RunnerID.substr(0,3) == "VAR" || RunnerID.substr(0,3) == "CAM") 14 { 15 alert(Output1) 16 } 17 else 18 { 19 alert(Output2) 20 } 21 } 22 </script>
Question 23
24 </head> 25 <body> 26 <form name = form1> 27 <label>Runner ID: </label> 28 <input type="text" name="txtRunnerID" > 29 <label>Position: </label> 30 <input type="text" name="txtPosition" size = "5" > 31 <p> 32 <label>Save data: </label> 33 <input type="button" name="btnSubmit" Value = "Submit"
Question 34
35 onMouseDown = "myButton_onmousedown()" > 36 </p> 37 </form>
Question 38
39 </body> 40 </html>
Question 13
(v)
Name and describe two other types of validation check which could be appropriate for
this data capture form.
Validation check: ...............................................................................................................
Description ........................................................................................................................
...........................................................................................................................................
Validation check: ...............................................................................................................
Description ........................................................................................................................
...........................................................................................................................................
Question 14
Question 15
Question 16
reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.
To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge International Examinations Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cie.org.uk after the live examination series.
Cambridge International Examinations is part of the Cambridge Assessment Group. Cambridge Assessment is the brand name of University of Cambridge Local Examinations Syndicate (UCLES), which is itself a department of the University of Cambridge.
Reveal official mark-scheme answer
Official answer for Question 6
Part (c)
(v)
- Format check
Question 1
Question 1
- Length check
Question 1
Question 1
- Range check
Question 1
Question 1
- Presence check
Question 1
Question 1
- Existence check
Question 1
Question 1
- Uniqueness check
Question 1
Question 1
Why this question appears here
71% assigned-topic match · Programming › Constructs
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_s17_qp_12.pdf
