ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* text field and goto
@ 1999-08-23 12:13 Matthew Baker
  1999-08-23 14:29 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Baker @ 1999-08-23 12:13 UTC (permalink / raw)


Hi,

Is it possible to set up a text field, such that the viewer is taken to a
reference (eg a section) when they press enter (or do something similar)?
I want to set up a text field so that if, for example, the user types 23
and presses enter, they are taken to a section whose label is section23.
My guess is to call a JavaScript routine, but I don't know how to jump to
a reference from within JavaScript, or if it's possible.

- Matthew

--
Dr. Matthew Baker           matthew.baker@gmd.de
GMD - FIT.MMK               http://fit.gmd.de/hci/pages/matthew.baker.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: text field and goto
  1999-08-23 12:13 text field and goto Matthew Baker
@ 1999-08-23 14:29 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 1999-08-23 14:29 UTC (permalink / raw)
  Cc: Context List

Matthew Baker wrote:

> Is it possible to set up a text field, such that the viewer is taken to a
> reference (eg a section) when they press enter (or do something similar)?
> I want to set up a text field so that if, for example, the user types 23
> and presses enter, they are taken to a section whose label is section23.
> My guess is to call a JavaScript routine, but I don't know how to jump to
> a reference from within JavaScript, or if it's possible.

grab data     -> getField(name)
jump to page  -> pageNum = value 
jump to dest  -> gotoNamedDest(tag)

More details can be found in the javascrip documentation to acrobat.
Also take a look at java-ini.tex; it shows how to pass a reference tag
or pagenumber. 

(you can also try to reverse engeneer the cdrom I sent you -)

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
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-08-23 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-23 12:13 text field and goto Matthew Baker
1999-08-23 14:29 ` Hans Hagen

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).