Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with an applet

Status
Not open for further replies.

Wtchbld

Technical User
Aug 2, 2001
6
US
Hello,

I am new at writing java and want to add this applet to my site as a starting point until I get a feel for how it is done. I downloded a free applet and am having trouble getting it working. Before I change the paragraph lines to
say what I want I am trying to get the backround image to load, but to no avail. Could you tell me what I am doing wrong? I am registered at geocities. Here is the code:

<html>
<head>
<title>TextScroller</title>
</head>
<body>
<center>
<applet code=&quot; width=520 height=591>
<param name=info value=&quot;Applet by Gokhan Dagli,textscroller.tripod.com&quot;>
<param name=textcolor value=&quot;03FEFE&quot;>
<param name=bgcolor value=&quot;000000&quot;>
<param name=enable_bgpicture value=&quot;1&quot;>
<param name=bgpicture value=&quot; <param name=speed value=&quot;40&quot;>
<param name=textdimension value=&quot;12&quot;>
<param name=fonttype value=&quot;Arial&quot;>
<param name=paragraph_number value=&quot;3&quot;>
<param name=parag1 value=&quot;Welcome to TextScroller Java Applet.&quot;>
<param name=parag2 value=&quot;Vertical text scroll effect. You can use background image.&quot;>
<param name=parag3 value=&quot;Please visit textscroller.tripod.com for download latest version of textscroller.&quot;>
</applet>

</center>
<br><br><br><br><br><br><br><br>

</body>
</html>

I would appreciate any help you can give. Thanks So Much!!!!
 
First of all, you must upload the .class file into the proper directory. In this case, upload the file text_scroller.class into anglspwn76(which I guess should be your main directory.) I click on the url link but it seems like the .class file is not uploaded.

Secondly, to change the background, you will need to upload the .jpg file into the same directory(which I think you haven't do so). If you have done these things, it should be running fine.

Regards,
Leon
 
Thank you for getting back to me LeonTang I appreciate the
response. I have already uploaded both the class file and
the image file into my anglspwn76 main directory, and they
are not working. Any other suggestions?

Thank again

Wtchbld
 
Seems like the uploading is not successful? Take a look at this:-


In the HTML codes, I set the class as CalculatorApplet.class. Now change the url to You should be able to see the download box displayed.

For your case, both the jpg and class files are not there, so the applet will not be able to load.

Btw, it could be due to the html source code too. Alter the example below to suit your applet.

<html>
<title>Snake And Ladder</title>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
if (navigator.userAgent.indexOf(&quot;MSIE&quot;) > 0) {
// Microsoft Internet Explorer
document.writeln('<CENTER> ');
document.writeln('<OBJECT classid=&quot;clsid:8AD9C840-044E-11D1-B3E9-00805F499D93&quot; ');
document.writeln('width=&quot;200&quot; height=&quot;200&quot; align=&quot;baseline&quot; ');
document.writeln('codebase=&quot; ');
document.writeln('<PARAM NAME=&quot;code&quot; VALUE=&quot;CalculatorApplet.class&quot;> ');
document.writeln('<PARAM NAME=&quot;type&quot; VALUE=&quot;application/x-java-applet;version=1.2&quot;> ');
document.writeln('No JDK 1.2 support for applet! ');
document.writeln('</OBJECT> ');
document.writeln('<CENTER> ');

}
else {
// Netscape Navigator / Communicator
document.writeln('<EMBED type=&quot;application/x-java-applet;version=1.2&quot; ');
document.writeln('width=&quot;200&quot; height=&quot;200&quot; align=&quot;baseline&quot; ');
document.writeln('code=&quot;CalculatorApplet.class&quot; ');
document.writeln('pluginspage=&quot; ');
document.writeln('<NOEMBED>No JDK 1.2 support for applet!</NOEMBED> ');
document.writeln('</EMBED>');
};
//-->

</SCRIPT>
</APPLET>
</html>

Regards,
Leon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top