Click to See Complete Forum and Search --> : Need help


WaZz
02-24-2006, 02:45 PM
I don't know anything about java, and I need to embed that script into HTML. Can anyone explain what to do ? How do I compile that, some peolpe said that, there was no method.... but I don't know what a method is. All I need is a beep alert in IE.

here is the script:

http://www.rgagnon.com/jsdetails/js-0024.html

BigDog
02-24-2006, 03:29 PM
Java is is no way related to JavaScript, other than a terrrible decision made in naming JavaScript. Please read:
http://www.webdeveloper.com/forum/showthread.php?t=44049

You want the Javascript forum. Somehow they are using JavaScript to call a Java function - ask the JavaScript folks how they do that.

WaZz
02-24-2006, 03:59 PM
I need that script to be compile or something so I can embed it in HTML


Is there something missing in that script ?

import java.awt.*;
import java.applet.*;
public class JavaBeep extends Applet{
public void oneBeep() {
Toolkit.getDefaultToolkit().beep();
}
}




I don't know how to do compile it... if it's compiled, how do I embed it into my html document ?

BigDog
02-24-2006, 05:03 PM
That is just a java applet. Yoou would need to run that through the compiler. To learn how to do that, you are better off running through some basic Java tutorials on Sun's website http://java.sun.com/learning/tutorial/ . There is info on Sun's java page ( http://java.sun.com ) on how to create and use an applet.

This is *NOT* a script that is written into your HTML doc like JavaScript is, you need to compile Java bytecode for the applet and put that bytecode in your webserver's content directory, plus put some markup in your normal html doc to call it. See the Sun page on the specifics.