| Adding File Upload to your HTML Form |
You can add the AppletFile Upload Applet to an existing HTML form by following these three steps:
Here is a simple example form:
<FORM ACTION="upload.asp"
onSubmit="return document.FileUpload.submit(document,this,true)">
<INPUT TYPE="submit" VALUE="Upload">
</FORM>
<APPLET CODE=FileUpload.class ARCHIVE=FileUpload.jar NAME=FileUpload
CODEBASE="/AppletFile/classes" WIDTH=420 HEIGHT=180 MAYSCRIPT>
<PARAM NAME="cabbase" VALUE="/AppletFile/classes/FileUploadIE3.cab">
<PARAM NAME="cabinets" VALUE="/AppletFile/classes/FileUpload.cab">
<PARAM NAME="directory" VALUE="C:\My Documents">
</APPLET>
In this example, the parameter directory is used to specify "C:\My Documents" as the default directory so that the first time the user adds a file, the Browse dialog will open in this directory.