URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: ushop_applets_shopcart
Thread Number: 49
[ Go back to previous page ]

Original Message
"Applet shows, but not the image"

Posted by jalina [jalina-m@home.com] on at 12:29 PM
I am trying to setup uShopInputImage1.class. The applet is there, but it shows error loading image.
I copied over the info and put in mine and it wont show the image, or the information. I made sure there were no comas anywhere. I can't figure out what it is im doing wrong. Can you please help me?

Table of contents

Messages in this discussion
"RE: Applet shows, but not the image"
Posted by Bill Weiner on at 01:17 PM
The problem may have to do with the location of your image file. Here are two options:

OPTION 1) PUT IMAGE FILES IN SAME DIRECTORY AS CLASS FILES.
The image files that are to be loaded by the uShopInputImage1.class should be located same directory as your other class files.

OPTION 2) USE RELATIVE PATH FROM CLASSES DIRECTORY WHEN SPECIFING THE IMAGE NAMES.
Otherwise, the name of the image should be specified with the directory path relative to your classes directory. For example, if you have the following directory structure:

store
I--classes
I--html
I--images

(With your class files, HTML pages, and images located in different directories)

Then you should specify the image name as:

../images/myimage.jpg

Or as another example, if you just have a directory structure like this:

store
I--html
I--images

(With all of the class files and HTML pages in the same directory, but the images in a different directory)

Then you should specify the image name as:

../html/myimage.jpg