For each control included into Image Uploader, the iuembed.js exposes an appropriate class:
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.
Some members have effect on ActiveX or Java version only. The following marking is used.
Members that work for both versions are not marked.
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
Note
This method works in Internet Explorer only. |
|
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
Note
This method works in Internet Explorer only. |
|
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:
Note
Unlike the controlType property it can be used every time after the writer object is created (not just after the writeHtml or getHtml method call). |
|
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. |
Name | Default value | Description | |
---|---|---|---|
activeXControlCodeBase | ImageUploader37.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
|
|
activeXControlVersion | empty string |
The minimum required version of the ActiveX version (ImageUploader37.cab file). If the user has an older version installed, Internet Explorer downloads the ImageUploader37.cab file from the URL provided by the activeXControlCodeBase property automatically. See the Upgrading Minor Versions topic for more details.
Important
The subversions should be separated only by commas (unlike the Java version).
For example, |
|
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:
Note
This property can be used only after writeHtml or getHtml method call. If you need to do it before, use the getControlType method instead. |
|
height | N/A (provided in the constructor) |
Height of the control. You should provide an integer number. Syntax like |
|
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 |
|
javaAppletCodeBase | ./ |
Path to the virtual directory on your server where ImageUploader37.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
|
|
javaAppletVersion | empty string |
The minimum required version of the ImageUploader37.jar. If the user has older version installed, the browser downloads the ImageUploader37.jar from the directory specified by the javaAppletCodeBase property. See the Upgrading Minor Versions topic for more details.
Important
If an empty string is specified, applet caching will not work regardless of the javaAppletCached value. The subversions should be separated only by dots (unlike ActiveX version). For example,
|
|
noFileSystemAccessInSafari | <p>The browser does not allow Image Uploader to access the local file system. To enable the access perform the following steps:</p><ul><li style='margin-top:10px'>Go to <b>Safari</b>→<b>Preferences</b>, choose the <b>Security</b> tab, and click <b>Manage Website Settings</b>.</li><li style='margin-top:10px'>Select <b>Java</b> in the left column, click on the dropdown box next to the <b>[name]</b> website, and choose <b>Run in Unsafe Mode</b>.</li></ul> |
The message which states that Image Uploader cannot access the local file system due to Safari security settings. It can contain the following placeholder:
|
|
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 |
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 |
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:
<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.