Please select a category and click GO
UK Residents: Get great deals on high quality designer bathroom fittings from plumbfit.com

Plumbfit: Basin mixers, showers, taps, towel radiators Plumbfit: Bathroom showers, taps, towel radiators Plumbfit: Bathroom taps, showers, taps, towel radiators Plumbfit: Concealed showers, taps, towel radiators Plumbfit: Exposed showers, taps, towel radiators Plumbfit: Towel rails, showers, taps, towel radiators

Go Back Community for Webmasters & Developers > Client-Side Technology Forums > JavaScript Forum
Reload this Page How to pass data from applet to Java Script
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
JavaScript Forum Pop-up, rollover, and drop-down to open a window on an object-oriented buzz session. Cookies will be served. DOM Perignon is also available for a truly vintage JavaScript experience.

Time:
Scotland: Fri, 4:29 am
Rhode Island: Thu, 11:29 pm
Florida: Thu, 11:29 pm
New Mexico: Thu, 9:29 pm
California: Thu, 8:29 pm

Click here to visit Livelife365.com

Click here to visit nmdarts.com



Buy this Ad Space.

180px wide.

Please get in touch with KH@ if you are interested and make an offer.

Selanac Embroidery and Screen Printing

Embroidery
Screen Printing
Signs and Banners
Promotional Advertising

WEBSITE

Contact Paul Canales
TEl: USA 732-901-8417
CELL: USA 732-773-1339


Please click here for more information

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-26-2000, 10:29 PM
Rekha Rekha is offline
Citizen
 
Join Date: Aug 2000
Posts: 11
Rekha is an unknown quantity at this point
Hi,
I want to send some value from java applet to java script written in HTML page. Is it possible to do this, if yes, how.

Rekha
__________________
Rekha
Reply With Quote
  #2  
Old 10-26-2000, 10:41 PM
voicebox's Avatar
voicebox voicebox is offline
Staff Pensioners
 
Join Date: Oct 2000
Location: Should be used instead of document.location . Except with a small l.
Posts: 3,236
voicebox is a glorious beacon of light; ignite the blue touch paper and see for yourself voicebox is a glorious beacon of light; ignite the blue touch paper and see for yourself voicebox is a glorious beacon of light; ignite the blue touch paper and see for yourself voicebox is a glorious beacon of light; ignite the blue touch paper and see for yourself
Send a message via ICQ to voicebox Send a message via AIM to voicebox
You will need some Java and some JavaScript. In your Java file, put this code:

Code:
String dataToSend = null;

public boolean dataReady() {
  return (dataToSend != null);
}

public String receiveData() {
  String dts = dataToSend;
  dataToSend = null;
  return dts;
}

private void sendData(String data) { // Call this somewhere in your applet
  dataToSend = data;
}
Give your applet a name with something like name="theapplet" somewhere in your applet tag. In your JavaScript code put something like this:

Code:
function check() {
  if (document.theapplet.dataReady())
    processData(document.theapplet.receiveData()); // you write this method.
  setTimeout("check()",1);
}
And add to your body tag onload="check()".
Reply With Quote
  #3  
Old 10-27-2000, 12:21 AM
Jay Jay is offline
Citizen
 
Join Date: Jun 2000
Location: Troy, NY
Posts: 659
Jay will become famous soon enough; the newspapers have the full story now
About Java Appletts...

Java applets are quite cumbersome, and are quite slow. Unless the Java Aplett is very cool and can't be done in other languages, I strongly suggest that you upgrade to a Flash animation or even do it in plain HTML. The reason they load so slowly is either because of the size of Java Applets, or it's because of slow browser interpritation, or it's because of unefficient Java coding.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASPsetting asp session variable to js variable AngelaFrench Microsoft Server-Side Solutions Forum 43 04-23-2002 02:16 AM
JavaScriptlayer priority between javascript and a java applet jaystark JavaScript Forum 1 11-29-2001 08:36 PM
OtherRestricting A Data File Size niceShoes CGI Scripting and Programming Forum 2 09-27-2001 03:18 PM
JavaScriptHow can I receive data from applet in java script Rekha JavaScript Forum 0 12-14-2000 12:14 AM


All times are GMT +1. The time now is 04:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2010, WebXpertz.com. All Rights Reserved.