Rank: Member
Groups: Member
Joined: 2/2/2007(UTC) Posts: 9
|
Here are the general values we are using to configure the control. Code:var iu = new ImageUploaderWriter("ImageUploader1", 650, 400); //This was original code, I have tried giving each new instance a unique ID. This solution would look like this:
//var uploadControlId = "ImageUploader" + GenerateRandomNumber();
//var iu = new ImageUploaderWriter(uploadControlId, 650, 400);
iu.activeXControlCodeBase = "../ImageUploader4.cab";
iu.activeXControlVersion = "4,1,1,0";iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = "2.1.32.0";
iu.showNonemptyResponse = 'off';
iu.addParam('PaneLayout', 'ThreePanes');
iu.addParam('FolderPaneHeight', '160');
iu.addParam('ShowDebugWindow', 'false');
iu.addParam('AllowMultipleRotate', 'true');
iu.addParam('AllowMultipleRemove', 'true');
iu.addParam('MessageUploadCompleteText', '');
iu.addParam('ButtonSendText', '');
iu.addParam('ShowDescriptions', 'false');
iu.addParam('SplitterLineStyle', 'Solid');
iu.addParam('FileMask', '*.jpg;*.jpe;*.jpeg;*.gif;*.bmp;*.png;*.tif;*.tiff');
iu.addParam('UploadSourceFile', 'false');
iu.addParam('UploadThumbnail1FitMode', 'Fit');
iu.addParam('UploadThumbnail1Height', '120');
iu.addParam('UploadThumbnail1Width', '160');
iu.addParam('UploadThumbnail1JpegQuality', '100');
iu.addParam('UploadThumbnail1ResizeQuality', 'High');
iu.addParam('UncheckUploadedFiles', 'false');
iu.addParam('Action', <URL1, removed for security purposes>);
iu.addEventListener('BeforeUpload', 'ImageUploader_BeforeUpload');
iu.addEventListener('Progress', 'ImageUploader_Progress');
iu.writeHtml();
function ImageUploader_BeforeUpload(){
var imageUploader1 = getImageUploader("ImageUploader1");
imageUploader1.AddField("WorkOrderId", document.getElementById("HiddenFieldWorkOrderId").value);
var imageCount = imageUploader1.getUploadFileCount();
for (var i = 1; i <= imageCount; i++){
imageUploader1.setUploadFileDescription(i,imageUploader1.getUploadFileGuid(i));
}
}
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText) {
var imageUploader1 = getImageUploader("ImageUploader1");
var currentAction = imageUploader1.getAction();
if(Status == 'COMPLETE' && currentAction == URL1, <removed for security purposes>) {
imageUploader1.setAction(URL2, <removed for security purposes>);
imageUploader1.setUncheckUploadedFiles(true);
imageUploader1.setUploadThumbnail1Height(480);
imageUploader1.setUploadThumbnail1Width(640);
imageUploader1.Send();
}
if(Status == 'COMPLETE' && currentAction == URL2, <removed for security purposes>) {
imageUploader1.setAction(URL1, <removed for security purposes>);
imageUploader1.setUncheckUploadedFiles(false);
imageUploader1.setUploadThumbnail1Height(120);
imageUploader1.setUploadThumbnail1Width(160);
CloseUploadPopUp();
}
if(Status == 'ERROR') {
alert("An error occurred when uploading your image(s)");
CloseUploadPopUp();
}
}
First, this control is contained in a popup window. I have several links on a page that will launch a new popup window to upload images, each for a specific order. Here are the steps to reproduce the behavior: Open two pop windows. Add images to both popup upload panes. Click "Send" on each popup window. Which ever popup was opened second, the image uploader control on that popup will hang. No exception is thrown, and the progress event always has a status of "START". Edited by user Friday, February 22, 2008 2:49:28 PM(UTC)
| Reason: Not specified
|