Aurigma Image Uploader 6.5 Dual
Helper Script Members
Classes
For each control included into Image Uploader, the iuembed.js exposes an appropriate class:
- ImageUploaderWriter class - for ImageUploader.
- ShellComboBoxWriter class - for ShellComboBox.
- UploadPaneWriter class - for UploadPane.
- ThumbnailWriter class - for Thumbnail.
All these classes have the same members (see below). This reference will mention only ImageUploaderWriter for brevity, however keep in mind that other classes also have members.
Methods
| Name | Arguments | Description | |
|---|---|---|---|
| addParam |
paramName - a parameter name. paramValue - a parameter value. |
Adds a parameter with the specified name and value. It takes into effect when writeHtml or getHtml method is run. |
|
| addEventListener |
eventName - an event name. eventListener - a name or reference to the JavaScript function which is the event listener. |
Subscribes the specified JavaScript function to the specified event. |
|
|
getActiveXInstalled | N/A |
Verifies whether ActiveX control is installed. If yes, it returns true; otherwise it returns false. |
|
getActiveXInstalledToUpdate | N/A |
Verifies whether ActiveX control is installed and needed to be updated (if an earlier version of the ActiveX control is already installed). If yes, it returns true; otherwise it returns false. |
| getControlType | N/A |
Returns a value that specifies what kind of platform is currently used - ActiveX, Java, or none (i.e. neither ActiveX nor Java can be used in the current browser). It may return one of the following strings:
|
|
|
getJREInstalled | N/A |
Verifies whether Java Runtime Environment (JRE) is installed on the current machine. This method returns one of the following values:
|
|
getJREVersion | N/A |
Returns version number of Java Runtime Environment (JRE) installed on the current machine. |
| getHtml | N/A |
Generates the HTML code which will embed Image Uploader and returns it as a string. It will write all parameters added with the addParam method and append all event handlers specified by the addEventListener method. |
|
| getParam | paramName - a parameter name. |
Returns parameter with a specified name. |
|
| removeEventListener |
eventName - an event name. eventListener - a name or reference to the JavaScript function which is the event listener. |
Unsubscribes a specified JavaScript function from a specified event. |
|
| removeParam | paramName - a parameter name. |
Removes parameter with a specified name. |
|
| writeHtml | N/A |
Generates the HTML code which will embed Image Uploader and writes this code directly into the page. It will write all parameters added with the addParam method and append all event handlers specified by the addEventListener method. |
Properties
| Name | Default value | Description | |
|---|---|---|---|
|
activeXControlCodeBase | ImageUploader6.cab |
The URL that specifies where to download the ActiveX version of Image Uploader from. It is analogous to the codebase attribute of the OBJECT element. |
|
activeXControlEnabled | true |
Value that specifies whether to use ActiveX version of Image Uploader. If true, the ImageUploaderWriter analyzes the browser, and if it is Internet Explorer and operating system is Windows, the writeHtml method generates the code for the ActiveX version. For other platform, the code for the Java version is generated. If you want to use the Java version regardless to the browser, set this property to false. |
|
activeXControlVersion | empty string |
The minimum required version of the ActiveX version (ImageUploader6.cab file). If the user has an older version installed, Internet Explorer downloads the ImageUploader6.cab file from the URL provided by the activeXControlCodeBase property automatically. See the Upgrading Minor Versions topic for more details. |
| controlType | N/A (depends on the browser) |
Value that specifies what kind of platform is currently used - ActiveX, Java, or none (i.e. neither ActiveX nor Java can be used in the current browser). It may return one of the following strings:
|
|
| height | N/A (provided in the constructor) |
Height of the control. You should provide an integer number. Syntax like 100% is acceptable, however keep in mind that it is not cross-browser compatible. That is why it is highly recommended to avoid it. |
|
| id | N/A (provided in the constructor) |
ID of the control that is used to get a reference with a help of the getImageUploader function. |
|
|
javaAppletCached | true |
Value which enables or disables caching for the Java version of Image Uploader. If true, then the caching is enabled, and the Java applet is not re-downloaded until you update it on the server. Otherwise the applet is re-downloaded every time the user visits this page. See the Upgrading Minor Versions topic for more details. |
|
javaAppletCodeBase | ./ |
Path to the virtual directory on your server where ImageUploader6.jar file is located. Unlike activeXControlCodeBase it should be a path to a directory, but not to the file. |
|
javaAppletEnabled | true |
Value that specifies whether to use Java version of Image Uploader. If true, the ImageUploaderWriter will generate the code for Java version when the ActiveX cannot be used. If false, and the ActiveX version cannot be used, the message stating that the browser is not supported will be displayed. |
|
javaAppletVersion | empty string |
The minimum required version of the ImageUploader6.jar. If the user has older version installed, the browser downloads the ImageUploader6.jar from the directory specified by the javaAppletCodeBase property. See the Upgrading Minor Versions topic for more details. |
| showNonemptyResponse | off |
Specifies whether and how Image Uploader will display a received server response. Possible values are:
If off, no response will be shown. If alert, the response will be displayed in an alert window. If dump, the response will be displayed at the bottom of the Web page with Image Uploader. This feature may be useful when debugging server scripts. See the Debugging Server Scripts topic for more details. |
|
| width | N/A (provided in the constructor) |
Width of the control. You should provide an integer number. Syntax like 100% is acceptable, however keep in mind that it is not cross-browser compatible. That is why it is highly recommended to avoid it. |
Standalone Functions
| Name | Arguments | Description | |
|---|---|---|---|
| getImageUploader | ID - an ID of the control specified in the ImageUploaderWriter constructor. |
Returns a reference to the control by specified ID. Unlike document.getElementById, it overcomes compatibility problems on certain browsers. |
Members for Private-Label Versions
When private-label version is used, you need to customize the following properties (that should not be changed in the standard version):
| Name | Description | |
|---|---|---|
|
activeXControlCodeBase | Name of the .cab file. |
|
activeXClassId | CLSID of the ActiveX control. |
|
activeXProgId | PROGID of the ActiveX control. |
|
javaAppletJarFileName | Name of the .jar file. |
|
javaAppletClassName | Applet class name. |
This code snippet demonstrates how to do it:
JavaScript
<script type="text/javascript">
var iu = new ImageUploaderWriter("ImageUploader1", 610, 500);
iu.activeXControlCodeBase = "MyUploader.cab";
iu.activeXClassId = "B8144F57-C240-4012-A5AE-6E06019EDA5F";
iu.activeXProgId = "MyCompany.MyUploader";
iu.javaAppletJarFileName = "MyUploader.jar";
iu.javaAppletClassName="com.mycompany.myuploader.MyUploader.class";
iu.writeHtml();
</script>Do not forget to modify these properties for other writer classes if you use them.
See the How to Use Private-label Versions topic for the detailed information on private-label version of Image Uploader.
- a member has effect on ActiveX only.
- a member has effect on Java only.