here is the full code im using...
index.php
<script src="../iuembed.js" type="text/javascript"></script>
<script type="text/javascript">
var separator = "...\n\r";
var maxFormatCount = 3;
var imageUploader1 = null;
function Format(name, paper, amount){
this.name = name; //Print format name
this.paper = paper; //Paper type.
this.amount = amount; //Number of copies of this format.
}
function parseDescription(description){
var formats=new Array();
if (description!=""){
var arrDescription = description.split(separator);
for (z = 0; z < arrDescription.length; z++){
arrFormat = arrDescription[z].split(" ");
formats.push(new Format(arrFormat[0], arrFormat[1], arrFormat[3]));
}
}
return formats;
}
function fullPageLoad(){
imageUploader1=getImageUploader("ImageUploader1");
}
function ImageUploader_SelectionChange() {
if (imageUploader1) {
var selectedFileIndex = null;
//This array stores all ordered formats for selected items.
var formats = new Array();
for (i = 0; i < maxFormatCount; i++){
formats.push(new Format("", "", ""));
}
//Iterate all upload list items and get common format information for all of them (i.e.
//format information which equals for all items).
for (i = 1; i <= imageUploader1.getUploadFileCount(); i++){
if (imageUploader1.getUploadFileSelected(i)){
var currentFormats = parseDescription(imageUploader1.getUploadFileDescription(i));
//For the first selected item just copy the current format...
if (selectedFileIndex == null){
selectedFileIndex = i;
for (j = 0; j < currentFormats.length; j++){
formats[j] = currentFormats[j];
}
}
//...and for all further selected items verify whether the current format is the same as
//for previous items. If yes, use it, otherwise the empty string is used.
else{
selectedFileIndex = "multiple"
for (j = 0; j < currentFormats.length; j++){
if (currentFormats[j].name != formats[j].name){
formats[j].name = "";
}
if (currentFormats[j].paper != formats[j].paper){
formats[j].paper = "";
}
if (currentFormats[j].amount != formats[j].amount){
formats[j].amount = "";
}
}
for (j = currentFormats.length; j < maxFormatCount; j++){
formats[j].name = "";
formats[j].paper = "";
formats[j].amount = "";
}
}
}
}
//If none files selected (i.e. selectedFileIndex is null), disable HTML form fields
//which edit print formats.
var disabled = selectedFileIndex == null;
var aSelectFormat = new Array();
var aSelectPaper = new Array();
var aInputAmount = new Array();
for (i = 1; i <= maxFormatCount; i++){
aSelectFormat[i] = document.getElementById("SelectFormat" + i);
aSelectFormat[i].disabled = disabled;
aSelectPaper[i] = document.getElementById("SelectPaper" + i);
aSelectPaper[i].disabled = disabled;
aInputAmount[i] = document.getElementById("InputAmount" + i);
aInputAmount[i].disabled = disabled;
}
var thumbnail1 = getImageUploader("Thumbnail1");
if (selectedFileIndex){
//Display format data in those fields which edit the same format settings.
for (i = 1; i <= maxFormatCount; i++){
if (formats[i - 1].name == ""){
aSelectFormat[i].selectedIndex = -1;
}
else{
for (j = 0; j < aSelectFormat[i].options.length; j++){
if (aSelectFormat[i].options[j].value == formats[i- 1].name){
aSelectFormat[i].selectedIndex = j;
}
}
}
if (formats[i - 1].paper == ""){
aSelectPaper[i].selectedIndex = -1;
}
else{
for (j = 0; j < aSelectPaper[i].options.length; j++){
if (aSelectPaper[i].options[j].value == formats[i - 1].paper){
aSelectPaper[i].selectedIndex = j;
}
}
}
aInputAmount[i].value = formats[i - 1].amount;
}
//Display selected image preview using <img> tag when only one item is selected. For multiple items blank area is displayed.
if (typeof(selectedFileIndex) == "number"){
thumbnail1.setGuid(imageUploader1.getUploadFileGuid(selectedFileIndex));
}
else{
//thumbnail1.style.display = "none";
thumbnail1.setGuid("");
}
}
else{
//thumbnail1.style.display = "none";
thumbnail1.setGuid("");
}
}
}
<body>
<table cellspacing="0" cellpadding="2" width="770" border="0" ID="Table1">
<tbody>
<tr>
<td align="left" width="770">
<form id="Form1" name="Form1">
Author: <input id="Author" type="text" size="50" value="BOB" name="Author" />
</form>
</td>
</tr>
<tr>
<a href="#" onclick="imageUploader1.SelectAll();return false;">
<img class="Icon" src="Images/SelectAllSmall.gif" alt="Select All" /> Select All
</a>
</td>
<td>
<a href="#" onclick="imageUploader1.DeselectAll();return false;">
<img class="Icon" src="Images/DeselectAllSmall.gif" alt="Deselect All" /> Deselect All
</a>
</td>
<td>
<a href="#" onclick="imageUploader1.Send();return false;">
<img class="Icon" src="Images/SendSmall.gif" alt="Upload" /> Upload </a>
</td>
<td>
<img class="Separator" src="Images/ToolbarSeparator.gif" alt="" />
</td>
<td>
<a href="#" onclick="imageUploader1.Refresh();return false;">
<img class="Icon" src="Images/RefreshSmall.gif" alt="Refresh" /> Refresh </a>
</td>
</tr>
</table>
</td>
<td class="Right">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="MainPanel">
<script type="text/javascript">
var iu = new ImageUploaderWriter("ImageUploader1", 630, 500);
//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../ImageUploader4.cab";
iu.activeXControlVersion = "4,0,12,0";
//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = "2.0.7.0";
//Configure appearance and behavior.
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("FolderView", "Thumbnails");
iu.addParam("TreePaneWidth", "220");
iu.addParam("FolderPaneShowDescriptions", "false");
iu.addParam("DescriptionsReadOnly", "true");
iu.addParam("ShowButtons", "false");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("EnableRotate", "false");
iu.addParam("AllowMultipleRemove", "true");
iu.addParam("BackgroundColor", "Red");
iu.addParam("PaneBackgroundColor", "Yellow");
iu.addParam("DisplayNameActiveSelectedTextColor", "Purple");
iu.addParam("DisplayNameActiveUnselectedTextColor", "#000000");
iu.addParam("DisplayNameInactiveSelectedTextColor", "#000000");
iu.addParam("DisplayNameInactiveUnselectedTextColor", "#000000");
iu.addParam("DropFilesHereText", "Drop files here");
iu.addParam("EditDescriptionTextColor", "#0000ff");
//Configure file mask to upload JPEG images only.
iu.addParam("FileMask", ".jpeg;.jpg;*.jpe");
//Disallow to upload too small images.
iu.addParam("MinImageWidth", "800");
iu.addParam("MinImageHeight", "800");
//Configure quality meter.
iu.addParam("QualityMeterFormats", "4 x 6,1800,1200,1.5;5 x 7,2100,1500,1.5;8 x 10,3000,2400,1.5;16 x 20,4000,3200,2;30 x 20,6000,4000,2");
//Configure upload settings.
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "3");
iu.addParam("AutoRecoverTimeOut", "3");
iu.addParam("Action", "upload.php");
iu.addParam("AdditionalFormName","Form1");
iu.addParam("ButtonFontName", "Courier");
iu.addParam("ButtonFontSize", "0");
//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl","gallery.php");
//Add event handlers.
iu.addEventListener("Progress", "ImageUploader_Progress");
iu.addEventListener("SelectionChange", "ImageUploader_SelectionChange");
iu.fullPageLoadListenerName = "fullPageLoad";
//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
//]]>
</script>
</td>
<td valign="top" class="DetailsPanel">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="Toolbar">
<tr>
<td class="Left">
</td>
<td class="Panel">
<span class="Header">Order Details</span>
</td>
<td class="Right">
</td>
</tr>
</table>
<div class="Info">
<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var t = new ThumbnailWriter("Thumbnail1", 230, 230);
//For ActiveX control full path to CAB file (including file name) should be specified.
t.activeXControlCodeBase = "../ImageUploader4.cab";
t.activeXControlVersion = "3,5,204,0";
//For Java applet only path to directory with JAR files should be specified (without file name).
t.javaAppletCodeBase = "../";
t.javaAppletCached = true;
t.javaAppletVersion = "1.1.81.0";
t.writeHtml();
</script>
<br />
<table align="center">
<tr>
<td>
Format:
</td>
<td>
</td>
<td>
Paper:
</td>
<td>
</td>
<td>
Amount:
</td>
</tr>
<tr>
<td>
</body>
</html>
<!--END-->