Specifying applet parameters

Top  Previous  Next

All applet parameters may be defined in sections of the HTML code and are used to control both the behavior and look and feel of HTTP File Upload Applet.  The default applet HTML code for HTTP File Upload Applet is provided below.  These are the minimum applet parameters that must be used in order to successfully load the applet and SHOULD NOT be removed or modified.

 

Default HTML code

 

<object width="700" height="560" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,2,0">

   <param name="code" value="com.jscape.httpapplet.HttpAppletCore.class">

   <param name="archive" value="httpapplet.jar">

   <param name="scriptable" value="true">

   <param name="mayscript" value="yes">

   <param name="name" value="httpapplet">

   <comment>

 <embed

           type="application/x-java-applet;version=1.4" \

           code="com.jscape.httpapplet.HttpAppletCore.class" \

           archive="httpapplet.jar" \

           name="httpapplet" \

           scriptable="true" \

           mayscript="yes" \

           width="700" \

           height="560" \

             pluginspage = "http://java.sun.com/products/plugin/index.html#download">

             <noembed>          

           </noembed>

 </embed>

   </comment>

</object>

 

 

Adding applet parameters

 

You may add applet parameters to the default HTML code to control the behavior and look and feel of the applet.  You will find these parameters discussed in other topics included with this documentation.

 

In order to use HTTP File Upload Applet successfully you must at a minimum add the url applet parameter.  This parameter defines the URL that is responsible for processing file uploads.  In order to add any parameter you must defined it in two places within the HTML code.  The first place is by adding a <param> tag and the second is to define a name/value pair in the <embed> tag.  Notice that a terminating \ must be added when adding parameters to the <embed> tag where parameters span multiple lines.  An updated version of the default applet HTML code has been provided to illustrate this.  Additional parameters may be added in a similar manner.

 

Example

 

<object width="700" height="560" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,2,0">

   <param name="code" value="com.jscape.httpapplet.HttpAppletCore.class">

   <param name="archive" value="httpapplet.jar">

   <param name="scriptable" value="true">

   <param name="mayscript" value="yes">

   <param name="name" value="httpapplet">

   <param name="url" value="http://www.domain.com/upload.php">

   <comment>

 <embed

           type="application/x-java-applet;version=1.4" \

           code="com.jscape.httpapplet.HttpAppletCore.class" \

           archive="httpapplet.jar" \

           name="httpapplet" \

           scriptable="true" \

           mayscript="yes" \

           url="http://www.domain.com/upload.php" \

           width="700" \

           height="560" \

             pluginspage = "http://java.sun.com/products/plugin/index.html#download">

             <noembed>          

           </noembed>

 </embed>

   </comment>

</object>

 

See also

 

Specifying the upload URL

Specifying applet parameters dynamically using JavaScript