🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16031

Re: Netscape java API

#16031
From: Omer Azhar Qureshi
Date: Thu, 08 Apr 1999 00:00
57 lines
1682 bytes
Dillan,
herez some code that dose javascript method call from an applet i this is a
duplicate of an answer that i gave in the applet-issues group

[The Applet Class]
import java.applet.*;
import java.net.*;

public class inJava extends Applet
{
  public void init()
  {
    String msg = "We will jump to an HTML tag";
    try
    {
        getAppletContext().showDocument (new URL("javascript:doAlert(\"" +
msg +"\")"));
        getAppletContext().showDocument (new
URL("javascript:jumpTo(\"#JUMP\")"));
    }
    catch (MalformedURLException me) { }
  }
}

[The Html containing the javascript]
<HTML>
<HEAD>
</HEAD>
<BODY>

<SCRIPT>
function doAlert(s){
   alert(s);
}
function jumpTo(tag) {
   self.location=tag;
}
</SCRIPT>

<APPLET CODE="inJava.class"
        NAME="myApplet"  MAYSCRIPT
        HEIGHT=400 WIDTH=10>
</APPLET>

<P>
<A NAME="JUMP">jump here from JAVA via JAVASCRIPT
</A>

</BODY>
</HTML>


http://www.tactika.com/realhome/realhome.html is a very good site when u
talk about netscape, applets, javascripts & powerbuilder, its how to
site....
hope this helps....
Oaq
Technical Details
Message-ID: <7ei1oe$1i311@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7eglvh$9m10@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,2931bf6f0b56a00e
X-Google-Attributes: gidf74b3,public
From: "Omer Azhar Qureshi" <oaq@systemeltd.com.pk>
Subject: Re: Netscape java API
Date: 1999/04/08
Message-ID: <7ei1oe$1i311@forums.borland.com>
X-Deja-AN: 463991118
References: <7eglvh$9m10@forums.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.language