Communication between Java Applet and Javascript

Communication between Java Applet and Javascript

Post by Mashrique Ismai » Tue, 01 Jul 1997 04:00:00



Hi,

Can anybody 'check and correct' the following code of java applet and
javascript.

Situation : A java applet parameter will call a javascript function and
receive a value return by the javascript.

Thanks in advance.

regards,
Friends.

Java Code:

public class TEST extends Applet
{
        public void init()
        {
                String input = getParameter("getCode");

                List list = new List();
                add(list);
                list.addItem(input);
        }      

Quote:}

HTML code:

<html>

<head>

<title></title>

</head>
<SCRIPT LANGUAGE="JavaScript">
 <!--
function temp()
{
        var myCode;
        myCode = "AER678";
        return myCode;

Quote:}

// -->/n

</SCRIPT>

<body bgcolor="ffffff" text="0000" link=0000ff vlink=ff0000>
<center>

<applet code="TEST.class" width=300 height=200>
<param name="getCode" value='javascript:temp();'>
</applet>

</body>

</html>

--
=========================================
Name      : Megat Shamsul Nizam M. Nazin


Url       : http://www.netshoppe.com.my
=========================================

 
 
 

1. javascript/java communication IE5

hello all,
  i am writing a web application for systems running internet explorer 5. i
have to use javascript to access an ActiveX/COM object and deploy its
methods (which i found is very hard to do in java). i need to run javascript
functions from a form that will update a database via this ActiveX object,
but i also need to send email. i would like to try and use java methods i
have residing on the server. is it possible to execute a java function
through javascript in internet explorer?

thanks in advance.
-mark

2. Help: Image on Startup

3. Communication Java Applet and Oracle Database

4. INFORMIX SE Deployment environment

5. access to javascript-variables from within an applet

6. Selecting the last record for each customer

7. Applet Name: SpreadSheet.Java - Problem: java.lang.nul.pointer

8. MULTIMEDIA MEDICAL INFORMATION SYSTEMS : Info please

9. JDBC-Driver (java.sql) with Java-Applets

10. How Call Java Applet from Oracle Java Application

11. Applet to database communication using beans...

12. http communication between applet and servlet