Applet doesn't work

A

Alastair McFarlane

How do I modify the following code if the .class files are in a different
location (another server)?

<applet code="billsClock.class" width="100" height="100">
<param name="BGCOLOR" value="000000">
<param name="FACECOLOR" value="FFFFFF">
<param name="SWEEPCOLOR" value="FF0000">
<param name="MINUTECOLOR" value="008080">
<param name="HOURCOLOR" value="000080">
<param name="TEXTCOLOR" value="000000">
<param name="CASECOLOR" value="000080">
<param name="TRIMCOLOR" value="C0C0C0">
<param name="LOGOIMAGEURL" value="java.gif">
<param name="LOCALONLY" value="1">
</applet>
 
A

Alastair McFarlane

Thanks, but how do I use them? Do I need both, or just one? Which one? I
have tried both but I may have done it wrong.

Alastair
 
M

Michael Winter

On Mon, 1 Mar 2004 18:02:47 -0000, Alastair McFarlane

[Using the codebase and archive attributes]
Thanks, but how do I use them? Do I need both, or just one? Which one? I
have tried both but I may have done it wrong.

You could have posted your attempt, so we could tell you. However, whether
you used them properly or not may be of no consequence.

According to the HTML specification, for security reasons, Java applets
must be located in the same directory as the document, or in a
subdirectory. An entirely different server will certainly not satisfy
those restrictions. I don't know to what extent this is enforced.

Of the two attributes Ike was referring to, codebase is the most
appropriate. It is a URI that specifies the location of the class files.
Note that with the restriction above, this is intended to be a URI that is
relative to the base address of the document and should only go deeper
(into more directories, not out of them).

The archive attribute is used to "preload" class files by specifying a
comma-separated list of URIs.

Be aware that this is off-topic in this group: JavaScript is not Java.
More appropriate groups would be comp.lang.java or
comp.infosystems.www.authoring.html.

Hope that helps,
Mike
 
A

Alastair McFarlane

Thanks Michael
I hadn't even realised that this was actually Java. Thanks for pointing that
out!!!
Thanks again for your help

Alastair

Michael Winter said:
On Mon, 1 Mar 2004 18:02:47 -0000, Alastair McFarlane

[Using the codebase and archive attributes]
Thanks, but how do I use them? Do I need both, or just one? Which one? I
have tried both but I may have done it wrong.

You could have posted your attempt, so we could tell you. However, whether
you used them properly or not may be of no consequence.

According to the HTML specification, for security reasons, Java applets
must be located in the same directory as the document, or in a
subdirectory. An entirely different server will certainly not satisfy
those restrictions. I don't know to what extent this is enforced.

Of the two attributes Ike was referring to, codebase is the most
appropriate. It is a URI that specifies the location of the class files.
Note that with the restriction above, this is intended to be a URI that is
relative to the base address of the document and should only go deeper
(into more directories, not out of them).

The archive attribute is used to "preload" class files by specifying a
comma-separated list of URIs.

Be aware that this is off-topic in this group: JavaScript is not Java.
More appropriate groups would be comp.lang.java or
comp.infosystems.www.authoring.html.

Hope that helps,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,229
Latest member
GloryAngul

Latest Threads

Top