9.2

Table Of Contents
The following example demonstrates how to use an HTML form to create a POST request
that uses the addfile request handler. The form looks like this:
To use this form:
1
Enter the name or IP address of the computer on which QuarkXPress Server is running.
2
Enter the port number in the port number field.
3
Enter the file name along with the extension in the file field. Click Browse if you need to
find the file on your computer. The file will be uploaded with this name.
4
Click Submit.
The file uploads to the document pool of the specified server. After the file is successfully
uploaded, the "File upload completed." alert is displayed.
For example, assume you want to upload a file named "Faces.pdf" (located at the root of
the C drive) to an instance of QuarkXPress Server running at IP address 202.201.92.34 and
port 8080, and that you want the name of the uploaded file on the server to be
"NewFaces.pdf." Here's how you would accomplish this in the HTML form:
The HTML code to generate the above sample file is as follows:
<HTML>
<HEAD>
<TITLE>Test Addfile</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function UploadDocument() {
var URL;
URL = "http://" + UploadForm.MachineIP.value + ":" +
UploadForm.Port.value + "/addfile/" + UploadForm.NewName.value;
UploadForm.action = URL;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM ID="UploadForm" METHOD = "post" ENCTYPE="multipart/form-data"
onSubmit="UploadDocument()">
Please enter the name or IP of machine where QuarkXPress Server is running:
<INPUT TYPE="TextBox" NAME="MachineIP"><br><br>
QXP SERVER 9.2 WEB INTEGRATION GUIDE | 115
USING THE WEB INTERFACE