diff options
author | Marius <mariausol@gmail.com> | 2010-07-04 15:32:09 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-07-04 15:32:09 +0300 |
commit | 85b7bc695629926641c7cb752fd478adfdf374f3 (patch) | |
tree | 80293f5aaa7b95a500a78392c39688d8ee7a32fc /tex/context/base/java-ans.tex | |
download | context-85b7bc695629926641c7cb752fd478adfdf374f3.tar.gz |
stable 2010-05-24 13:10
Diffstat (limited to 'tex/context/base/java-ans.tex')
-rw-r--r-- | tex/context/base/java-ans.tex | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tex/context/base/java-ans.tex b/tex/context/base/java-ans.tex new file mode 100644 index 000000000..636c894f9 --- /dev/null +++ b/tex/context/base/java-ans.tex @@ -0,0 +1,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 / Hans Hagen \& Ton Otten}] +%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 |