🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1282

Re: exchange dat : java <=> javascript

#1282
From: Darron Smith
Date: Sat, 09 Jan 1999 00:00
52 lines
3669 bytes
Of late I've been having some real fun and games with this to do with a
project and some custom Java Buttons.

It's actually real easy.
Give the applet a name within the applet tag. <applet src='blah.class'
name="blahblah" etc...>
It should then be as simple as "StringValue =
self.document.blahblah.myString;"

Now for the problems with this.
a). You must be absolutely certain with certain browsers that the applet is
loaded and in v3 browsers there is no provision in
JavaScript to do this. In other words you need a sometimes quite long delay
before using the properties and methods in a Java
applet after the page is loaded or you'll get scripting errors!
b). If there are several copies (or instances) of the same applet loaded on
a page (for instance 16 of the affore mentioned
buttons) with IE at least. Only the properties and methods of the last
loaded applet are available to JavaScript! Even if you give
them different names you will only ever get values returned from the last
one due to the way the "wrappers" are generated for the
calls. (I had to make my Java buttons talk to each other using statics with
class scope so they could tell the last one which one
was clicked).
c). Applets stay in memory and stay running within the browser even if you
leave a page. You will need to close down the browser
and restart it if you make changes to your applet as it will not
automatically refresh properly. With Windows98 this means a
complete restart of windows because of the active desktop and its' use of
IE4. The active desktop in 98 is JavaScripted DHTML
as is the display window in Outlook98.

Darron Smith
BBC Broadcast Webmaster

Marc ARIBERTI wrote in message <76o0ol$fjr$1@platane.wanadoo.fr>...
>How to exchange data between a java-applet and a script
>for example, how to put a string in a formular taken from a String named
>myString stored in an applet
>please, help me ...
>
>--
>/\_____/\_____/\_____/\_____/\_____/\_____/\
>\/          \/          \/          \/          \/          \/          \/
>e-mail : marcari@multimania.com
>site : http://ww.multimania.com/marcari/
>------- java --- astronomie --- maths -------
>/\_____/\_____/\_____/\_____/\_____/\_____/\
>\/          \/          \/          \/          \/          \/          \/
>
>
>
Technical Details
Message-ID: <777i89$4cu$1@nntp0.reith.bbc.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <76o0ol$fjr$1@platane.wanadoo.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10731d,d633e1c16a17f044
X-Google-Attributes: gid10731d,public
X-Google-Thread: 1089d0,d633e1c16a17f044
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f5533,d633e1c16a17f044
X-Google-Attributes: gidf5533,public
X-Google-Thread: 10d6db,d633e1c16a17f044
X-Google-Attributes: gid10d6db,public
X-Google-Thread: 113ae9,d633e1c16a17f044
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 10a146,d633e1c16a17f044
X-Google-Attributes: gid10a146,public
X-Google-Thread: fb3cb,d633e1c16a17f044
X-Google-Attributes: gidfb3cb,public
From: "Darron Smith" <darron.smith@bbc.co.uk>
Subject: Re: exchange dat : java <=> javascript
Date: 1999/01/09
Message-ID: <777i89$4cu$1@nntp0.reith.bbc.co.uk>
X-Deja-AN: 430527805
References: <76o0ol$fjr$1@platane.wanadoo.fr>
X-BBC-Trace: MTMyLjE4NS4xMzQuMTA=
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: news@bbc.co.uk
X-Trace: nntp0.reith.bbc.co.uk 915885129 4510 132.185.134.10 (9 Jan 1999 12:32:09 GMT)
Organization: British Broadcasting Corporation, UK
NNTP-Posting-Date: 9 Jan 1999 12:32:09 GMT
Newsgroups: aus.computers.java,borland.public.intrabuilder.javascript,borland.public.jbuilder.java.api,comp.lang.java.help,comp.lang.java.programmer,comp.lang.javascript,microsoft.public.es.java