summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-03 12:15:38 +0900
committerNorbert Preining <norbert@preining.info>2020-08-03 12:15:38 +0900
commit05d9e348e9ce7fb895782424da35d989a0396a44 (patch)
treee48802af5a9aebd6844d921d691c8bbd83063363 /texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex
parentef9ddae5d03bd4cc3eceda25fbbccc37f1554e93 (diff)
thorshammer (new)
Diffstat (limited to 'texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex')
-rw-r--r--texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex35
1 files changed, 35 insertions, 0 deletions
diff --git a/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex
new file mode 100644
index 00000000..b20c438a
--- /dev/null
+++ b/texmf-dist/doc/latex/thorshammer/examples/ordinary-option/get-hash-string.tex
@@ -0,0 +1,35 @@
+\documentclass{article}
+\usepackage[designi]{web}
+\usepackage{eforms}
+
+%\previewOn\pmpvOn
+
+\parindent0pt \parskip6pt
+
+\begin{document}
+
+\begin{defineJS}{\btnAct}
+var resp=app.response({
+ cQuestion: "Enter a PIN number",
+ cTitle: "Get Hash String"
+});
+var f=this.getField("txt");
+if (resp!=null) f.value=Collab.hashString(resp);
+\end{defineJS}
+
+Create a four digit (PIN) number and copy that number into the body of the
+definition of the \verb|\PIN| command, which is defined in the source file
+\texttt{quiz-pwd-to-correct-AR.tex}. This is to record and save the number.
+
+Push the button and enter the four digit number you just created into the
+response box. When you press the \textsf{OK} button, the hash string of the
+number you entered appears in the text field. Copy and paste this value into
+the \texttt{quiz-pwd-to-correct-AR.tex} as the value of the
+\texttt{\_PinCode} JavaScript variable. Now you're ready to compile the file
+\texttt{quiz-pwd-to-correct-AR.tex}.
+
+\pushButton[\CA{Push}\AAmouseup{\btnAct}]{btn}{}{11bp}\olBdry
+\textField[\textSize{8}]{txt}{2in}{11bp}\olBdry
+\pushButton[\CA{Reset}\AAmouseup{this.resetForm();}]{reset}{}{11bp}
+
+\end{document}