Debian Codegraph @

texmf-dist/doc/latex/interactiveworkbook/epsfiles/fieldsubmit.eps

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % SUBMIT FIELD BUTTON: COMPARES TEXT_FIELD (USER) ANSWERS WITH
4 % ANSWER_TEXT_FIELD (CORRECT) ANSWERS AND
5 % IF MATCH, GOES TO CORRECT RESPONSE PAGE;
6 % OTHERWISE, GOES TO INCORRECT RESPONSE PAGE
7 %
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9 %!PS-Adobe-3.0 EPSF-3.0
10 %%BoundingBox: 0 0 90 30
11 %%EndProlog
12 [
13 /T (Field_Submit_Button)
14 /Rect [0 0 90 30]
15 /Subtype /Widget
16 /F 4
17 /FT /Btn
18 /Ff 65540
19 /H /P
20 /AP << /N {Submit_Up} /D {Submit_Down} >>
21 /Action <<
22 /Subtype /JavaScript
23 /JS(
24 var isRight = true;
25 var undefined;
26
27 function adjustIsRight\(inAnswerName, inCorrectName\) {
28 var theAnswerField = this.getField\(inAnswerName\);
29 var theCorrectField = this.getField\(inCorrectName\);
30 if \( theAnswerField != undefined \) {
31 if \( theAnswerField.value != theCorrectField.value \) { isRight = false; }
32 }
33 }
34
35 for \(theCount = 1; theCount < 6; theCount++\) {
36 if \( "pageonefield"+theCount != undefined \)
37 adjustIsRight\("pageonefield"+theCount, "fieldanswer"+theCount\);
38 }
39
40 if \(isRight==true\) { this.pageNum = 1; } else { this.pageNum = 2; }
41 )
42 >>
43 /ANN pdfmark
44 %%EOF