<APPLET CODE="diputab.class"
ARCHIVE="diputab.jar" WIDTH=150 HEIGHT=250>
<PARAM name=recordseparator value="^">
<PARAM name=fieldseparator value="|">
<PARAM name=options value="
^backgroundcolor|C0C0C0
^foregroundcolor|C0C0C0
.
.
.
^tipwait|1000
^tipfontprofile|tipdefaultfont
">
</APPLET>
Passing a single parameter is accomplished with the parameter tag.
The parameter tag contains the following parts
The diputab applet uses the parameter tag for passing complete database tables from the applet definition in your web page to the applet.
Such a parameter can contain multiple records and every record can contain multiple fields.
So first you have to define which character will serve as a record separator and which character will serve as a field separator. This is done through the parameters recordseparator and fieldseparator. These are the only 2 single value parameters, they are meta-parameters (parameters who describe other parameters)
So if we want to define 4 persons whose names are Sven, Danny, Jessica and Serge, with their home address Oostende, Baal, Mechelen and Mechelen and with the ages of 25,28,25 and 29, then we have to define the following parameter (assuming recordseparator is ^ and fieldseparator is | )
^Sven|Oostende|25
^Danny|Baal|28
^Jessica|Mechelen|25
^Serge|Mechelen|29
Rule:
You always need to enter the fieldseparator, even if you are using a default value for a field.
Exception:
You can omit the fieldseparators when a default field or the end of the record follows every default field.
First the general rule
Let us assume that the default city is set to
Mechelen.
Now our parameter looks like this:
^Sven|Oostende|25
^Danny|Baal|28
^Jessica||25
^Serge||29
For Serge and Jessica we used the default city. But notice that although we used the default value for the city field, we still had to use the field (we left it blank!)
The exception
Now assume that the default age is 25.
This would make the parameter look like this:
^Sven|Oostende
^Danny|Baal|28
^Jessica
^Serge||29
Notice that Jessica does not require any fieldseparator, because a default field or the end of the record follows every default field (jessica has 2 default values). Now the parser (the code that reads in the fields) can not be mistaken, he knows that all the non declared fields are default fields.
Instead of hardwiring the value of your parameter in the web page, you can tell diputab to fetch the value from a file.
Rule:
Use a prefixed URL in the value part of the parameter tag.
A prefixed URL is an URL with the characters "url:" prefixed. So just add url: in front of the URL where your values file is located. You can use fully qualified or relative URLs.
Example:<APPLET CODE="diputab.class"
ARCHIVE="diputab.jar" WIDTH=150 HEIGHT=250>
<PARAM name=entries value="url:http://www.mysite.com/mydirectory/entries.html">
</APPLET>
If you use the same files for the options, fonts and images parameters your site will look and feel the same everywhere! Updates in a file will be reflected site wide.