473,473 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Applet doesn't work

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>
Jul 20 '05 #1
4 1374
Ike
it's in the "codebase" and archive tags. Usually, these point to same
server, but I believe can point elsewhere. See
http://www.technalink.com/vdist/eato...ydroline1.html for an example of
using them -Ike

"Alastair McFarlane" <al*****@2-athol.fsnet.co.uk> wrote in message
news:c1**********@news5.svr.pol.co.uk...
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>

Jul 20 '05 #2
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
"Ike" <rx*@hotmail.com> wrote in message
news:RI******************@newsread1.news.atl.earth link.net...
it's in the "codebase" and archive tags. Usually, these point to same
server, but I believe can point elsewhere. See
http://www.technalink.com/vdist/eato...ydroline1.html for an example of
using them -Ike

"Alastair McFarlane" <al*****@2-athol.fsnet.co.uk> wrote in message
news:c1**********@news5.svr.pol.co.uk...
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>


Jul 20 '05 #3
On Mon, 1 Mar 2004 18:02:47 -0000, Alastair McFarlane
<al*****@2-athol.fsnet.co.uk> wrote:

[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

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #4
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" <M.******@blueyonder.co.invalid> wrote in message
news:op**************@news-text.blueyonder.co.uk...
On Mon, 1 Mar 2004 18:02:47 -0000, Alastair McFarlane
<al*****@2-athol.fsnet.co.uk> wrote:

[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

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: WMMorgan | last post by:
There's a website I like to visit that has an user-interactive java application. There's a "visual applet" component and "control applet" component. (No, it's not an adult or porno site.) But...
5
by: Laura | last post by:
Hello, Newbie question: Does anyone know how to dynamically set the screen width in an applet? I have an applet that creates a horizontal bar menu on a webpage, and I would like the width to be...
4
by: Evan Dekker | last post by:
hi all im not why this code doesn't work: ///////// import java.applet.*; import java.awt.*; public class TestApplet extends Applet { public void init() {
3
by: Don | last post by:
Hi, I try to get a simple applet working, the class-file does load, but the image doesn't appear;( An error doesn't appear. The view is and stays 'grey' What I want: Automatic refresh of a...
4
by: timwap | last post by:
I hava a Java Applet that produces a DTMF tone at a certain time of day. There are 4 parameters to the Applet, they are hour = Hour of triggered event 00~23 min = minute of triggered event 00~59...
2
by: Put 030516 in email subj to get thru | last post by:
I've always been bothered about having to statically declare the size of a Java applet window (container?) in the calling HTML. I've always wanted the moral equivalent of width=50% statement (of...
1
by: Jean-Luc Gyger | last post by:
Hello, I have on a html page an applet. A javascript function call one function of this applet. It works with IE but not with Mozilla or Netscape. I obtain the following error on the java-plugin...
1
by: admin | last post by:
Hi all, I wrote a small text editor (using a JTextPane) in order to ease the use of a CMS, in a more WYSIWYG way. Basically, you can see directly the effect of setting the background color, the...
0
by: ankur | last post by:
WHEN I RUN THIS WEB APPLICATION ON Tomcat5.5.9 SERVER MY HttpChatApplet sccessfully Loaded from ChatDispatch but running on some another PC HttpChatApplet not loaded my Coad ...
1
by: mitch | last post by:
We have a page that combines HTML with a Java applet. The applet has a big rectangle in the middle of the page. Above the applet we have some dropdown menus that are in HTML (and JavaScript and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.