From - Sat Jun 14 22:28:55 1997
Path: world1.bellatlantic.net!out2.nntp.cais.net!in1.nntp.cais.net!hunter.premier.net!feed1.news.erols.com!news-xfer.netaxs.com!news.fast.net!newsgate.ptd.net!news.ptd.net!not-for-mail
From: Don Rea <don@pennyfarthing.com>
Newsgroups: comp.lang.javascript
Subject: Re: Java,Javascript & Forms
Date: 6 Jun 1997 06:00:38 GMT
Organization: Penny Farthing Projects
Lines: 32
Message-ID: <3397A863.1623@pennyfarthing.com>
References: <33922B3F.7791@uvic.ca>
Reply-To: don@pennyfarthing.com
NNTP-Posting-Host: cs1-10.sun.ptd.net
NNTP-Posting-User: drea
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0Gold (Win95; I)

Jon Swoveland wrote:
> 
> Hi,
> 
> I know how to call Java method from an web-page using Javascript, but
> does anybody know if the opposite is possible. Basically, I have a form
> that takes input from a user and returns values (ideally in the same
> form).  I would like to pass the input values to an Applet (I know how
> to do this), have the Applet proccess the values and then return the
> calculations to another text field in the same form.
> 
> Many Thanks in advance,
> Jon

Netscape includes some limited script callability-from-Java in their
third and fourth generation implementations, but unless you can count on
your users having Netscape software, it's probably not worth it.

IMHO better, usually, is including a method in your applet that makes
the new values available, and a script that polls them and handles the
field update. It's just always easier to call Java from JS than vice
versa.

I've been beating my head out on this recently, and that's what I've
come up with. If you must call backwards, in NN >=3.0 you can
showDocument() a "javascript:" protocol URL, or use a call() method
(documented on the Netscape web LiveDocument pages).

If you find out anything more, please let us all know. 
-- 
Don Rea
<don@pennyfarthing.com>
