File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applet doesn't respond??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet doesn Watch "Applet doesn New topic

Applet doesn't respond???

Tom Barns
Ranch Hand

Joined: Oct 27, 2000
Posts: 138
Hi All
I'm trying to run a script when the applet gets downloded,or at least to get respond when i click on it.I can't make that works.
here is my html file and java file:
Html file:
<script language="javascript" >
function show()
var y=88;
document.writeln("hello world ");
return y;
<object code="TextFieldApplet10.class" id="matt" width="500" height="200" onLoad="show();" >
<input type="button" value="Click on me " onClick="alert('Hee hee!');"></a>
Here is the java file"
import java.awt.*;
import java.applet.*;
public class TextFieldApplet10 extends Applet
public void init()
TextField txt1 = new TextField(" ");
thanks for your time.

Thanks for your help.
Suneel Setlur
Ranch Hand

Joined: Nov 26, 2000
Posts: 202
The program in the present status shows the applet with the text box you added and gives an alert message "Hee Hee". For your javascript function to work, you will have to call the function.
<input type="button" value="Click on me " onClick="show()">
When you do this "hello world" in a new browser screen.
[This message has been edited by Suneel Setlur (edited March 30, 2001).]

I agree. Here's the link:
subject: Applet doesn't respond???
It's not a secret anymore!