Dear ConTeXt users, In experimenting with (JavaScript) fields I tried the example on p. 11 in the up-to-date 1998/1 publication. I placed the check field not in the margin, but in the running text and discovered that \goto{Help}[JS(Toggle_Hide{Help})] does work if it is placed after \fitfield[Help], but that it does not work if it is placed before \fitfield[Help]. For the commands \goto{Hide Help}[HideField{Help}] and \goto{Show Help}[ShowField{Help}] their position relative to \fitfield[Help] does not matter. Would it be possible to make a command ToggleField, analagous to HideField and ShowField, whose position relative to \fitfield[Help} is not important? Thank you, Sytse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Here is the complete example: \setupoutput[pdftex] \setupinteraction[state=start] \starttext \definefield[Help][check][Helpsetup][helpinfo][helpinfo] \setupfields[reset] \setupfield[Helpsetup][width=fit,height=fit,frame=off,option={readonly,hidden}] \definesymbol[helpinfo][\SomeHelpText] \def\SomeHelpText% {\framed [width=\leftmarginwidth,height=fit,align=middle,style=small, frame=on,background=color,backgroundcolor=white,framecolor=red] {Click on the hide button to remove this screen}} %\fitfield[Help] % if uncommented, all three \goto's work ok Now we can put the button somewhere and turn the help on or off by saying \goto{Hide Help}[HideField{Help}] or \goto{Show Help}[ShowField{Help}]. Although it's better to put these commands in a dedicated part of the screen. And try \goto{Help}[JS(Toggle_Hide{Help})]. \fitfield[Help] % \goto{Help}[JS(Toggle_Hide{Help})] does not work \stoptext %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
At 12:27 12/05/2003 +0200, Sytse Knypstra wrote:
Dear ConTeXt users,
In experimenting with (JavaScript) fields I tried the example on p. 11 in the up-to-date 1998/1 publication.
I placed the check field not in the margin, but in the running text and discovered that \goto{Help}[JS(Toggle_Hide{Help})] does work if it is placed after \fitfield[Help], but that it does not work if it is placed before \fitfield[Help].
can you test if \useJSscripts[fld] helps? for some functionality you need to preload some javascript definitions Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Thank you, Hans. It works fine now. Do you have a similar solution for my problem that \fillinfield{Sytse} does not work? Sytse At 5/12/2003 01:41, you wrote:
At 12:27 12/05/2003 +0200, Sytse Knypstra wrote:
Dear ConTeXt users,
In experimenting with (JavaScript) fields I tried the example on p. 11 in the up-to-date 1998/1 publication.
I placed the check field not in the margin, but in the running text and discovered that \goto{Help}[JS(Toggle_Hide{Help})] does work if it is placed after \fitfield[Help], but that it does not work if it is placed before \fitfield[Help].
can you test if
\useJSscripts[fld]
helps? for some functionality you need to preload some javascript definitions
Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (2)
-
Hans Hagen
-
Sytse Knypstra