[pdftex] prompt in insdljs-package, question from a beginner

TW Ma twma at maths.uwa.edu.au
Fri Mar 12 04:48:35 CET 2004


The following JavaScript in HTML-file located at 
            https://www.maths.uwa.edu.au/~twma/xyz/js.htm
is working well. I try to convert it into Latex by insdljs-package.

AA-message appears but the rest of JS-script is skipped.

I replace the line 
         yourText=app.prompt("Type in something","*here*");
by       yourText=    prompt("Type in something","*here*");
it still does not work. Be grateful if somebody can help. 

Thank you in advance.  T-W Ma,  twma at maths.uwa.edu.au

----------------- Listing of all my files  -----------------

                  https://www.maths.uwa.edu.au/~twma/xyz/jsLa.tex
produces          https://www.maths.uwa.edu.au/~twma/xyz/jsLa.pdf 
successfully by miktex on PC.
-----------------
\documentclass[12pt]{article}
\usepackage[pdftex]{insdljs}

\OpenAction{/S /JavaScript /JS (
var yourText;
app.alert("AA-message");
yourText=app.prompt("Type in something","*here*");  %% this is the problem
app.alert ("what you type is "+yourText);  
                        %% works as expected if delete the above two lines
app.alert ( "End of JS-script") ;
)}

\begin{document}
Testing JS-scripts in Latex.
\end{document
-------------------------------------
https://www.maths.uwa.edu.au/~twma/xyz/js.htm
-----------------
<HTML><HEAD><TITLE>123</TITLE></HEAD><BODY>123-top<p>

<SCRIPT Language="JavaScript">
var yourText;
alert("AA-message");
yourText=prompt("Type in something","*here*")
alert ("what you type is "+yourText);
alert ( "End of JS-script") ;
</SCRIPT>

<p>bottom-789<p></BODY></HTML>




More information about the pdftex mailing list