summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/java-ans.mkii
blob: 7e310baa495cfa510841ab45c262b1c67d7debcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
%D \module
%D   [       file=java-ans,
%D        version=1998.06.01,
%D          title=\CONTEXT\ JavaScript Macros,
%D       subtitle=Answer Analization,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 
%C details. 

\startJSpreamble{Do_Check_Answer} used later 

  function Do_Check_Answer (field, value) 
   { if (event.value.toLowerCase()==value.toLowerCase())
       { event.target.hidden = true }
     % { event.target.display = display.hidden }
     return("\040") } // funny, "" does not work

\stopJSpreamble

\startJScode{Check_Answer} uses {Do_Check_Answer}
  event.value = Do_Check_Answer(JS_S_1, JS_S_2) ; 
\stopJScode

\endinput