!
5!
Some additional information follows a function declaration’s parameter. First is request
type (GET or POST) or a file upload/download specifier. The options are: GET, POST,
DOWNLOAD, UPLOAD[1], UPLOAD[1P] UPLOAD[*], UPLOAD[*P]. Because file
uploads require POST (and we default to POST for downloads) a request type is not
needed for functions doing file upload and download.
File handlers defined with a 1 in the square brackets handles one file upload while the file
handlers defined with a * handle multiple files. The P in the file handling designators are
used to tell the interface that the browser to track the progress of the upload or download.
A request type or file upload/download specifier may be followed by a session key flag,
as seen in the item tagged 6. This directs the system to include session key handling in
the communication. This can be useful for session handling without using cookies.
The item tagged 7 provides declarations for JavaScript functions that process data
received from the server.
3.2 Generating Javascript
There are two parts to the Javascript code for the interface. One is a library of general
functions used by the system, which is included in the HTML file. The other is a
JavaScript file containing the custom AJAX interface code. This is generated by the
system for the application and is also included in the HTML file. The name of this
generated JavaScript file is selected by the user at the time that the file is generated.
Suppose that a generated JavaScript file is given jader.js as its name. This file will
contain a definition for an object named jader that contains all of the JavaScript functions
necessary to satisfy the requirements given by the description file. The jader object
organizes functions in sub-objects within itself. All functions for calling a cgi-script will
be members of the jader.cgi object. All functions for calling an fcgi-script will be
members of the jader.fcgi object. All receiver functions will be members of the
The jader object will also contain a universal callback function that receives data from
the server, determines which receiver function should receive it, splits up the data
received into appropriate parameters for the receiver function, and calls the receiver
function with the parameters.
The functions that are members of jader.cgi and jader.fcgi are fully generated. For
functions that are members of jader.skel, the system generates function skeletons where
code in the body of the function is created by a developer.