ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Zhichu Chen" <zhichu.chen@gmail.com>
Subject: Re: How to display JavaScript's values in ConTeXt
Date: Thu, 7 Sep 2006 08:49:25 +0800	[thread overview]
Message-ID: <769ba7780609061749s23017f99j16bc1b19c91430a0@mail.gmail.com> (raw)

It's so kind of you. Your example really helps me 'cause I can learn
javascript and ConTeXt by books but there are few materials about how
to associate them.

Still, I'm sorry I have to open a new thread. I don't know how to
reply under you, it's sad.



---------- Forwarded message ----------
From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Date: Wed, 06 Sep 2006 12:06:02 +0200
Subject: Re: [NTG-context] How to display JavaScript's values in ConTeXt
Zhichu Chen wrote:
>  . . .
First thing to say: I'm also a javascript beginner (used it only once!),
so don't expect too much from me :)

In the following code the missing vars and function are added
(javascript debugger), but still the initialisation ('undefined' text)
and the reset for the result field are missing (and who knows what
else). But it's a 'working' starting point.

\startJSpreamble functions used now
 function do_digit(d)
   {console.println("do_digit("+d+") at page "+[this.pageNum]);
    Stack[Level] += String(d);
    do_refresh(Level) }

 var Stack = new Array();
 var Level = 1 ;

 function do_refresh (i) { vv = this.getField("Stack.".concat(i)) ;
 if (vv) { vv.value = Stack[i] ;
 vv.readonly = (i!=Level) ;
 this.dirty = false } }
\stopJSpreamble

>  . . .
>
I have not used text fields before (so no example code) and this is all
I have about JavaScript:

http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/


from http://partners.adobe.com/public/developer/pdf/topic_js.html:

http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/AcroJS.pdf
http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/AcroJSGuide.pdf
http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/javascript/AcroJSRefErrata.pdf

BUT MOST IMPORTANT:

http://partners.adobe.com/public/developer/en/pdf/debugger.js

Description:
"Use this file to enable the JavaScript Debugger in Adobe Reader, as
described in the Acrobat JavaScript Scripting Guide."

Hope that helps,

Peter

>  . . .
>
>

             reply	other threads:[~2006-09-07  0:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07  0:49 Zhichu Chen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-06  2:02 Zhichu Chen
2006-09-06  2:01 Zhichu Chen
2006-09-06 10:06 ` Peter Rolf
2006-09-05  4:56 Zhichu Chen
2006-09-05  9:42 ` Peter Rolf

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=769ba7780609061749s23017f99j16bc1b19c91430a0@mail.gmail.com \
    --to=zhichu.chen@gmail.com \
    --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).