Link to home
Start Free TrialLog in
Avatar of acsleftpeg
acsleftpeg

asked on

A problem with a simple Applet

I got this code from a friend's site.

<applet code=ButtonOnFly.class width=80 height=91>

    <param name="IMAGE_OFF" value="ifade2.jpg">

    <param name="IMAGE_ON" value="ifade.jpg">

    <param name="HREF" value="ianbackg.html">

    <param name="MESSAGE" value="Click for a brief background of Ian Brown">

</applet>

I've adapted it for my site but it doesn't work it throws an error message saying load: class ButtonOnFly not found.
How do I fix this? The purpose is that when you put the mouse pointer in the picture it lights up, simple as that. When you click the picture you goto a new HTML page.
Please help
thanks
decg@tinet.ie
ASKER CERTIFIED SOLUTION
Avatar of aziz061097
aziz061097

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aziz061097
aziz061097

I have an example of accessing an applet from javasoft's site

<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>

Here is the output of my program:
<APPLET CODEBASE="http://java.sun.com/docs/books/tutorial/getStarted/applet/example/" CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>

Is your Class file readable for everyone?
Avatar of acsleftpeg

ASKER

I don't know if I have a class file
<applet code=ButtonOnFly.class width=80 height=91>

means you are running the ButtonOnFly.class file.  If you only have ButtonOnFly.java file that means you didn't compile it to ButtonOnFly.class.  

You will need jdk to do so.  For details, go to http://java.sun.com/products/jdk/1.1/index.html
Sieger,

    Yes the classfile will be downloaded to the browser from where you access that Applet, so it is visible but due to security it can do only those things it is supposed to do wihin the security limitations.

acsleftpeg,

       If you do not have a class file but your friend has it on his web site then also you can access it on your page as if it is residing on your webserver. Just try pointing the CODEBASE to your friends website.
Aziz
I tried your codebase line and a security message thing comes up in the status bar. How did my friend get the ButtonOnFly.class file?
Thanks
Hi acsleftpeg,

     I have found the ButtonOnFly.class on the Web . I can e-mail it to you as an attachment. Please give your e-mail address
The ButtonOnFly.class seems to be a freeware. I could not find the Source for it though. I can send you sample html and sample image files.
Aziz,
My e-mail is decg@tinet.ie
Thanks
www.geocities.com/SunsetStrip/Cabaret/9714/
Is Aziz your real name?
I have sent the files in a zip . It contains the sample image files and html files with the ButtonOnFly class file. Run ButtonOnFly.html in a browser after extracting .

Yes, my name is Aziz.