[pdftex] pdflatex and javascript help

mchakuna mchakuna at 21cn.com
Fri Jan 9 16:58:37 CET 2004


hi all,
  I would like to use pdflatex to produce a pdf document which embeded
some javascript. I found some code on internet.

\documentclass{article}
\usepackage[pdftex]{insdljs}

\begin{insDLJS}[HelloWorld]{mydljs}{MyPrivateDLJS}
  function HelloWorld()
  {
    var f=this.getField("myButton");
    f.fillColor = color.gray;
  }
\end{insDLJS}

\begin{document}
  \begin{Form}
    Push\PushButton[name=myButton,onclick={HelloWorld();}]{Button}
  \end{Form}
\end{document}

Here, a javascript function will be trigged when there is a mouse
click. However, acrobat also support javascript relate to mouse over,
mouse up , mouse down, etc. events. How can I create a function
response to these sort of events within pdflatex?

Thanks in advance.



More information about the pdftex mailing list