uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Tech Support
       Support Policy
       Knowledge Base
       Reference Sites
       Software Piracy
       Legal Notices
       Privacy Policy
       Reseller Info
       Contact Us
       Site Map
codebase at root

Knowledge Base Lobby : uShop Support Conference : General Questions
Jul-16-18 12:54 AM EST
Original Message
codebase at root
Author Dale on 02-28-2001 at 16:27 (EST)
I am using NOF, which automatically sets the CODEBASE to ./ as part of the program, so to make uShop work it is best to have my CODEBASE at root.
I can get most scripts to work but cannot get the display_cart and display_product to work.
I tried changing the CODEBASE within those files and cannot seem to find the right combo.
I am transistioning a site from 2.0, and test site can be found at:


Table Of Contents
  RE: codebase at root Bill Weiner, 2001-03-01 06:44:21 (1)
            codebase at root Dale, 2001-03-01 11:05:49 (2)
                 RE: codebase at root Bill Weiner, 2001-03-01 13:06:30 (3)
                      codebase at root Dale, 2001-03-02 07:40:44 (4)
                           RE: codebase at root Bill Weiner, 2001-03-02 08:06:08 (5)

Messages In This Discussion
         1. RE: codebase at root
        Author Bill Weiner on 03-01-2001 at 06:44 (EST)
I took a look at your site... and saw that many of your applets have the codebase now set to "../"... so I'm guessing you're in the middle of making some changes.

In any case, I will provide some information below as to how to make the codebase "./":

STEP 1) Of course, set the CODEBASE setting on the < APPLET > line of ALL of your applets to:


STEP 2) In either your "uShopInitialize" applet or your "uShopOrderButton" applet, ALSO specify the special codebase parameter like this:

< PARAM NAME="codebase" VALUE="./" >

(This is IN ADDITION to specifing the codebase on those applets on the < APPLET > line as well.)

STEP 3) Edit your "display_cart.html" page so that the codebase of your "uShopJSI" applet is:


And that should do it! Just put all of your class files and HTML pages in the same directory.
                 2. codebase at root
                Author Dale on 03-01-2001 at 11:05 (EST)
So you are saying that ALL the files have to be in same directory?

I have all the directory structure currently as recommended except for the ../classes/ diretory.

Will it work if I keep the receommended struture but have all the calss files in root.
                         3. RE: codebase at root
                        Author Bill Weiner on 03-01-2001 at 13:06 (EST)
Setting the codebase to "./" will cause most browsers to look in the current directory for the class files. (i.e., the same directory as the HTML page). So that is why if you use "./" as your codebase... you would need all of the HTML and class files in the same directory.

                                 4. codebase at root
                                Author Dale on 03-02-2001 at 07:40 (EST)
Hi Bill,

Thank you for your answers.

I actually made a typo in my note. The codebase that NOF generates is codebase="../" instead of what I originally stated as ./

Does your answer still apply, that I would have to have all the classes in the HTML directory?

Thanks again
                                         5. RE: codebase at root
                                        Author Bill Weiner on 03-02-2001 at 08:06 (EST)
Ok, a codebase of:


... will allow you to put all of your classes up a directory from your HTML files... but that would cause another problem on the page that is displayed after you press the uShopOrderButton. That "display_cart.html" page will be loaded from the "classes" directory (or in your case the root directory).... but the uShopJSI applet on that page would technically need a codebase of "./" instead of "../" in order for the class files to be found. But that is not possible, because the codebase of ALL of your applets must be identical in order to work on the various browsers.

A good rule of thumb is that:

"Your class files and your HTML files must be on the same directory level."

This will ensure that the codebase rule is followed:

"All of your applets must have the EXACT same codebase setting".

So it really is recommended that you choose a directory structure such that class files and HTML files are on the same directory level.


On a side note, if using version 3.4 or later, there is a trick that may allow you to keep the class files in your root directory.... and your other HTML files in a subdirectory. It's kind of tricky... and I'm not sure if it will work on all browsers, but here's what you could do:

STEP 1. Put a copy of the "display_cart.html" page in one of your subdirectories with your other store HTML pages.

STEP 2. Make sure the "uShopJSI" applet on that page has a codebase equal to all of the other applets/html pages in that subdirectory.

STEP 3. On whatever page you currently have your uShopOrderButton applet, change the WIDTH and HEIGHT of that applet to something like "2" and "2"... in order to make the uShopOrderButton applet virtually invisible. (That applet must still stay on that page because it handles loading some important files.... but by setting the WIDTH and HEIGHT to "2" ... no one will really be able to see it).

STEP 4. On that same page, setup a regular HTML link to your "display_cart.html" page. (So that customers will follow that link instead of pressing the uShopOrderButton applet).

STEP 5. Try it out!

Note again that you must be using version 3.4 or later for this to work.

© 2003 Microburst Technologies, Inc.