ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: Context List <ntg-context@ntg.nl>
Subject: Re: Menus from Javascript
Date: Wed, 06 Oct 1999 13:46:49 +0100	[thread overview]
Message-ID: <37FB44B9.17B2AE83@wxs.nl> (raw)
In-Reply-To: <Pine.SGI.4.04.9910061257160.74118-100000@urizen>

Matthew Baker wrote:

> > Yes, AcroJs.pdf. This one is:
> >
> > app.fullscreen = true ;
> 
> So, to use openaction or closeaction I would do something like
> 
> \setupinteraction[state=start,openaction={JS(app.fullscreen = true;)}]
> 
> ?
> 
> This doesn't seem to work.

No. 

\startJScode{fullscreen} 
  app.fullscreen = true ; 
\stopJScode

\setupinteraction[..,openaction=JS(fullscreen)]

(or, openaction=,{JS(fullscreen),lastpage,firstpage,CloseDocument}]

Alternatively: 

\startJSpreamble {whatever} used now 

function FullScreen 
  { app.fullscreen = true } 

\stopJSpreamble 

... openaction=JS(FullScreen)]

This saves bytes when one uses a function more than once. 

So, it comes down to separate the JS code from the reference; than way
one can more easy replace the implementaion by for instance by PERL code
in a dviviewer than has an interface to perl (Wasn't gilbert working on
that?) or a real Java plugin in the reader (Matthew's next challenge).

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


  reply	other threads:[~1999-10-06 12:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-06  9:12 Matthew Baker
1999-10-06 11:21 ` Hans Hagen
1999-10-06 10:58   ` Matthew Baker
1999-10-06 12:46     ` Hans Hagen [this message]
1999-10-06 12:20       ` Matthew Baker
1999-10-06 16:11         ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37FB44B9.17B2AE83@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).